View Full Version : html or htm extension
02-11-2004, 04:10 PM
What is the difference between using a *.html extension for a page and using a *.htm extension. I've noticed that Frontpage creates pages with htm extension. What's up with that? Does the extension matter?
unix standard is html
windows standard is htm (to fit in with the dos/windows three letter extension naming standard)
It doesn't really matter - either one will work as the directory index (if set that way in the apache httpd.conf which it is here). The only note is that there is an order specified for the directory index so an index.html file (if present) will be seen first and thus will override index.htm if you uploaded both.
The order in which apache looks for a directory index (as specified at http://www.aota.net/HTML/homepage.php4) is:
index.shtml (means the server will process for ssi instead of just serving)
index.shtm (means the server will process for ssi instead of just serving)
index.php (means the server will process as php instead of just serving)
index.php4 (means the server will process as php instead of just serving)
index.php3 (means the server will process as php instead of just serving)
index.cgi (means the server will process as cgi instead of just serving)
index.fquest (the default coming soon page - thus when the client uploads index.htm or index.html that will override even if they forget to delete index.fquest)
This can also be useful in other ways. For example if you install a forum which uses index.php as it's directory index when someone visits yourdomain.com/forum and you want to take it offline while working on it, you can simply upload an index.html file with text such as "please come back in a few minutes - work in progress" and that will be read instead of index.php.
02-11-2004, 05:54 PM
Thanks for all the info. I think I'll start using .html extensions.
02-11-2004, 06:03 PM
Interesting corollary: if your index file is index.cgi - you have to actually SPECIFY the file in the URL, or you will get a Shame on you, Not Allowed 403 error. You can just go mysite.com/cgi-bin/subdirectory/ and hope the script will load, in other words. it has to be cgi-bin/subdirectory/index.cgi.
Perhaps that's why it's at the bottom of the hierarchy, LOL.
02-11-2004, 06:11 PM
Mandi, I believe that is because in your example, you are giving the URL to a subdirectory within the cgi-bin.
However, it is not necessary if the file is under the /www directory.
I have used the URL
where I have no actual index.cgi file, but create a symlink from the file /www/index.cgi to a particular file in my cgi-bin.
And no 403 results from just using the domain name without the index.cgi file being specified.
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.