How to make redirect /index.html ->
/ in Apache?
Redirect /index.html http://domain-name.com/
Is causeing infinite loop when opening home page.
It is most likely causing an infinite loop as they are the same. The default pages in Apache are
If the browser does not request a file name the web server will return one of those files if it finds them.
So When you go to
http://domain-name.com you are actually viewing
http://domain-name.com/index.html just without
Just do it the other way round, instead of redirecting to the domain
example.com, tell the server which page to display when a user requests the domain directly.
In the .htaccess file you can write (this is the default anyway):
Now if somebody requests
http://example.com the server will actually send back the
index.html file, but the browser still displays
http://example.com. If somebody requests
http://example.com/index.html there is no reason not to deliver this page, as long as you do not link to this URL somewhere, nobody will ever request it in this form.