Mobile app version of vmapp.org
Login or Join

Login to follow query

More posts by @Berumen354

3 Comments

Sorted by latest first Latest Oldest Best

 

@Goswami781

From an SEO perspective, if example.com/ and example.com/index.html are the same, use canonical links to address it.

10% popularity Vote Up Vote Down


 

@Murray432

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):

DirectoryIndex index.html


Now if somebody requests example.com the server will actually send back the index.html file, but the browser still displays example.com. If somebody requests 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.

10% popularity Vote Up Vote Down


 

@Sent6035632

It is most likely causing an infinite loop as they are the same. The default pages in Apache are index.html and index.htm.

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 domain-name.com you are actually viewing domain-name.com/index.html just without /index.html

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme