Why Is .html File In Root Directory Not Rendering In Browser? Shows Index Of/
Hello I just have a simple .html file in the root directory of my site:
But when I visit that site in the browser,
it's showing me index of/ and I have to click on test.html in order to display the page properly:
(and then after clicking on test.html)
Any idea why it's showing the test.html file first and then I have to click on it in order to get the page to display properly?
This is the only file in the directory.
Thanks.
12 Answers
You either need to change test.html to index.html or put the following code in your .htaccess file:
DirectoryIndex test.html
Works Perfectly fine on my Chrome Browser.
Have you tried clearing the cache and then retrying? I've had a similar issue because of the browser cache.
Hope this helps.
1