CBG Posted April 22, 2011 Share Posted April 22, 2011 Hi, I have the below rule to try and convert index.php?page=allnews&etc.. to news.php RewriteCond %{QUERY_STRING} page=allnews RewriteRule ^index.php$ news.php [R=301,L] The problem I am having is the URL changes to: news.php?page=allnews I am wanting to strip everything after news.php in the rule Can anyone help? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/234436-solved-htaccess-strip-part-of-the-url-part-of-rewrite-rull/ Share on other sites More sharing options...
CBG Posted April 22, 2011 Author Share Posted April 22, 2011 Hi, Have got it now, it was all in a ? (question mark) RewriteCond %{QUERY_STRING} page=allnews RewriteRule ^index.php$ news.php? [R=301,L] Quote Link to comment https://forums.phpfreaks.com/topic/234436-solved-htaccess-strip-part-of-the-url-part-of-rewrite-rull/#findComment-1204825 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.