...

View Full Version : htaccess URL Rewrite not working after 301 redirect



htcilt
08-17-2011, 01:44 PM
I have the following url rewrite:


RewriteRule ^info/([^/\.]+)/?$ info.php?page=info&subpage=$1 [L]

Originally the parameters were the page id's i.e. 0-10. I have now changed this so the URLs have more meaningful slug names to reflect the content.

I have now set up the 301 redirects, for example:


Redirect 301 /info/0 http://www.example.com/info/intro

But the problem is, the redirect doesn't go to the url rewrite (http://www.example.com/info/intro). Instead it shows the full url (http://www.example.com/info.php?page=info&subpage=0)

How can it get it to keep the rewrite?
Many thanks

Cags
08-17-2011, 02:29 PM
Are you clicking a link on your site or attempting to type the address in the URL? Either way what is the URL you are attempting (either typing or the href value of the link you are clicking)?

htcilt
08-17-2011, 03:12 PM
Changing the redirect to a rewriterule did the trick :)

RewriteRule ^info/0$ http://www.example.com/info/intro [R=301,L]



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum