Forum Moderators: phranque
I had an old website that had a landing page (index.html), that users then clicked enter to get to the homepage (home.html).
Ive since made a new site (on the same domain) and want to redirect home.html to the site root (ie www.domain.com)
However, applying:
Redirect 301 /home.html [domain.com...]
Causes a redirection loop, but
Redirect 301 /home.html [domain.com...]
Does not...?
I understand why a redirection loop would be caused if i did:
Redirect 301 /index.html [domain.com...]
But dont get why it happens with home.html
I can post my .htaccess file if it helps to see it.
Thanks for any help.
I don't know if there's a mechanism to remove entries, but you could try adding
DirectoryIndex index.php and seeing if that helps. Added: and welcome to WebmasterWorld, Major Disaster!
[edited by: Receptional_Andy at 8:52 pm (utc) on May 10, 2008]
Within 6 minutes i got a friendly greeting and an answer that solved my question. What a forum!
If you didnt guess, adding "DirectoryIndex index.php" solved my problem!
Cheers for the help. Much appreciated.
EDIT: With that ive realised i can also redirect my "old" index.html to the siteroot.
Once again, thanks.
[edited by: Major_Disaster at 9:03 pm (utc) on May 10, 2008]
# Redirect Index Files, in root or in folders, at (www.)domain.eu, to be Folder-Based URLs with trailing slash, at www.domain.eu, and Strip Parameters:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*(index多ome)\.(html?如hp地spx?).*\ HTTP/
RewriteRule ^(([^/]*/)*)(index多ome)\.(html?如hp地spx?)$ http://www.domain.eu/$1? [R=301,L]