301 redirect doesn't work?
- SEO |
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
(Of course I replaced example with my domain name!)
It worked for a few minutes and then stopped redirecting. I've tried several other versions of the redirect but nothing works.
The fact that it started out working tells me the code is correct but there must be something else conflicting with it.
I also tried to redirect my index.html page to the root domain with equal lack of success.
My .htaccess file has this pre-existing code and I wonder if anything here is causing the problem:
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName "control-your-blood-pressure.com"
AuthUserFile /users4/data/c/controly-07386/public_html/_vti_pvt/service.pwd
AuthGroupFile /users4/data/c/controly-07386/public_html/_vti_pvt/service.grp
-
Mark Brian -
Thanks
Signature{{ DiscussionBoard.errors[847791].message }} -
-
DavidO -
Thanks
{{ DiscussionBoard.errors[847800].message }} -
-
Mark Brian -
Thanks
Signature{{ DiscussionBoard.errors[847808].message }} -