toolman Posted February 6, 2013 Share Posted February 6, 2013 Hi, I am trying to use this redirect, but it isn't doing anything. RewriteRule ^directory/page.html?ref=test$ http://www.website.com/directory/page.html?ref=test2 [R=301,L] Any ideas why it doesn't work? Thanks Quote Link to comment Share on other sites More sharing options...
requinix Posted February 6, 2013 Share Posted February 6, 2013 RewriteRule does not include the query string. You have to test for that manually with a RewriteCond. RewriteCond %{QUERY_STRING} =ref=test RewriteRule ^directory/page.html http://www.website.com/directory/page.html?ref=test2 [R=301,L] If that still doesn't work, try adding a /? after the ^. Quote Link to comment 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.