How to display context on the landing URL/Domain ??

August 27, 2014 2k views

I want, for example, to land on the page, show the contents of, but on the browser I want to see

I'm using apache web server

3 Answers

I'm sure you just described the default behaviour of most web servers. Apache and nginx will look for an index.html or htm file by default when you load a directory. When you browse to you are (if you don't have any redirects) requesting the root web directory. If your web server is configured to look for index.html index.htm (like I said, they are by default) they it'll load it, if it exists, and you won't need to do anything else.

Are you seeing different behaviour?

Hi Mark,

You are right.. Our webserver was configured to redirect the URL to land on index.html, which as you say, IS the default behaviour.. I've removed this redirection and see that the URL gets redirected to index.html from my DocumentRoot.. However, the URL still shows instead of

How do I still hide index.html

I also saw a link

RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.index.html\ HTTP/
RewriteRule ^(.
)index.html$ /$1 [R=301,L]

Will this resolve the issue??? Thanks again


Just wanted to share that finally we managed to resolve this problem thanks to brilliance from my colleague who hit the right target..

Apparently, there is a setting on the httpd.conf as below .. After setting DirectoryIndex to disabled, this has worked perfectly..


DirectoryIndex index.html index.html.var

DirectoryIndex disabled

Thanks a lot for the help !! :)

Have another answer? Share your knowledge.