Page 1 of 1

Avoid 'INDEX OF'

Posted: 2017-11-21 16:06
by jorus
When I publish my website to a file on my pc, and put that file on the server, I go online to check the website but I'm not being directly leaded to the index page, instead I see a blank page with the text "INDEX OF" and then the filename I've used to store the project on my pc. After I click this link, than I am being leaded to the index page. When I upload only the subfiles from that one main file to the server, and go online, I am being directly leaded to the index page. Still I prefer to work from 1 file and upload each time 1 file to the server but while being lead directly to the index page online, is there a trick to get that done?

Re: Avoid 'INDEX OF'

Posted: 2017-11-21 18:20
by boco
The "file" you publish your website to is actually a directory (or "Folder", as Windows names it).

Web browsers expect the index document of your website at the web root directory. Thus, if you upload the website files directly, you're doing it right and the site works. (index.html in the web root).

Uploading the directory as-is will not work as the index document is not where it should be. A missing index document causes the index listing you witnessed.

Two possible solutions:
1. Forget preferences and follow technical necessities. The index document must be in the web root.
2. Write yourself an index document that redirects to the one in the subdirectory. Place that document in the root and it will instruct the browser to continue to the subdirectory automatically.