I've found that the following two URLs will show the same content:
http://example.com/blog/
http://example.com/blog/index.html
In the case of the first URL, it appears to pick up the index.html
from the blog
pseudo-folder. I guess this is because I have index.html
configured as my index document.
However, the browser is not redirected. This means I end up with two different URLs being hit for the same content. From the point of view of analytics and other things this is a pain.
Can I make S3 redirect with a 301 to index.html? Or the other way around?
/blog
redirects to/blog/
so that relative paths of documents under "/blog/" work correctly as links. The subsequent request for/blog/
then displays the content of/blog/index.html
(implicit) without it being reflected in the address bar. Navigating to/blog/index.html
shows the same content (explicit). I can't provide a reference, just anecdotal observations of 18 years of working with web servers... Apache, Nginx, IIS, S3 with static hosting, and any number of relatively minor players... when an index/default document is defined, that's what they do.mod
script for Apache, or whatever). What I meant by a reference was a citation from one of the the HTTP RFCs or similar.