smtdev smtdev - 3 months ago 19
Apache Configuration Question

Can a subdirectory load .html file, hiding its "name.html" in the bar address?

I have a personal website and I am thinking in use subdirectories on it to storage all the updates of my applications, with a structure like this:

If I enter in, which is a subdirectory, I'd like to display the content of a .html file (i.e:/applications/apps.html) hiding the entirely filename and extension in the bar address, so it will show just This file contains links for each application.

If I enter into one of these links (i.e.: /applications/application1/), it will do the same as /applications/ (display the html file content, hiding it in the bar address).

I know I can hide the file extension with .htaccess, but I think it is not the way I am looking for.

Thanks a lot!


What you are looking for is DirectoryIndex . You want to set app.html as your directory homepage. You can use the following in applications/.htaccess :

DirectoryIndex apps.html

This will load apps.html when the directory is requested.