.htaccess - Redirect 301 - why is my old url being appended to my new url causing a 404 error? -
redirect 301 /features/blahblah.php http://www.mysite.com/articles/blahblah1.php results in http://www.mysite.com/articles/blahblah1.php?q=features/blahblah.php 404 error page not found.
so doing wrong here
http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect documents what's happening.
you want use redirectmatch, like:
redirectmatch ^/features/blahblah.php http://www.mysite.com/articles/blahblah1.php if want "permanent" redirect http status 301 (which can desirable seo purposes) rather temporary 302 redirect, instead use:
redirectmatch permanent ^/features/blahblah.php http://www.mysite.com/articles/blahblah1.php
Comments
Post a Comment