Issue with permanent redirect implementation
Posted
by
Argoron
on Pro Webmasters
See other posts from Pro Webmasters
or by Argoron
Published on 2011-06-26T11:48:17Z
Indexed on
2011/06/26
16:30 UTC
Read the original article
Hit count: 210
I have a tricky problem related to 301 redirections I badly need help with. I tried to implement these via .htaccess, but ran into trouble.
The start of my .htaccess looks like this:
SetEnv PHP_VER 5
Options +FollowSymlinks
RewriteEngine on
# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^(www\.|$) [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
#--- GENERAL ---
RewriteRule ^index\.html$ index.php [L]
...
When I try to put a permanent redirect to index.php by adding R=301 in the square brackets, I get a 404, and I have no idea where the error comes from.
© Pro Webmasters or respective owner