Forum Moderators: phranque
Somewhere I must've linked to /index.html and the SEs have indexed both www.mydomain.com and www.mydomain.com/index.html
I have seen some other posts with similar examples using mod rewrite which just goes way over my head.
I would like to setup a simple 301 redirect in .htaccess as such:
redirect 301 /index.html [mydomain.com...]
Would this be the simplest and best way to accomplish?
This subject was covered in this recent thread [webmasterworld.com].
Jim
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html\ HTTP/
RewriteRule ^(([^/]+/)*)index\.html$ http://www.example.com/$1 [R=301,L]
This will solve the problem of both URLs being indexed correct?
Also there is some other "mod rewrite" code within my .htaccess will the addition of this code effect it at all?
This goes way over my head, so I best paste the code here (which btw I have no idea what it does, and can see errors in my error log)
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST}!^www
RewriteRule (.*) [%{HTTP_HOST}...] [L,R=301]
Thanks again for your time>