.html extension required

Web hosting, FTP/database access, mirror services and hosted blogs
Post Reply
damian
Posts: 2
Joined: Thu Jan 19, 2006 7:16 pm
Location: Brisbane

.html extension required

Post by damian » Sat Nov 22, 2008 10:18 am

Probably a brainless question but anyway.

So I spent hours extracting my old files from the old server and ftping them up to the new one. My pages are deliberately dead simple. There is just one problem, they don't seem to load unless you include the file extensions. So a page that is say 750S.html used to load if you typed: www.whatever/750S now requires www.whatever/750S.html

Small thing but it's enough to ensure all the links I've got on the web are now dead.

You know if I wanted to spend hours f'ing around with this I'd just get a web server up at home, then I'd be able to see what's going on and control the thing properly. Instead I'm poking around half blind rebuilding an identical website on a new server because exetel couldn't be bothered copying our files across.

Dazzled
Volunteer Site Admin
Posts: 6003
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: .html extension required

Post by Dazzled » Sat Nov 22, 2008 11:22 am

Are you trying to point your browser directly at a specific file in a sub-directory in your web space? If so, what you are experiencing is the normal behaviour of Apache when asked to serve a file. That is how it is configured. In Unix (and Linux) there are no suffixes in the DOS and Windows sense - the ".html" is part of the file name, not an appendage used by the OS.

Or are you referring to href="whatever" in anchor tags? If so, you again should use complete file names. Apache will not normally fill in a suffix.

Apache configuration can be seen at http://httpd.apache.org/docs/2.2/

damian
Posts: 2
Joined: Thu Jan 19, 2006 7:16 pm
Location: Brisbane

Re: .html extension required

Post by damian » Sun Nov 23, 2008 10:37 am

I was pointing at a specific file in the directory.

That may be how YOU set it up, but if that were the general case there would be an awful lot of 404's out there. Next your going to suggest every url has to be prefixed with http:www.

The shortened file name worked before, it doesn't now. Most "consumer" webservers are set up to interpret the shorter file name and add the extension, in fact several common extensions. If they didn't then anyone pointing to the page would have to get the url dead right. How often would that fail ?

Anyway thank you for the response. I'm not normally this terse, but I have far more important things to be doing right now than f'ing around with webpages.

Gidget
Volunteer Site Admin
Posts: 1813
Joined: Wed Jan 28, 2004 4:33 am
Location: Sydney

Re: .html extension required

Post by Gidget » Sun Nov 23, 2008 10:48 am

damian wrote:... because exetel couldn't be bothered copying our files across.
There were a number of valid reasons why Exetel didn't simply copy everything across from the old server to the new server ... none of them related to "couldn't be bothered".

I'll refer your issue to the sysadmin responsible but I don't expect you'll get a reply before tomorrow.

Gidget
Log a fault ticket here
or call Exetel VOIP numbers (02) 8030 1000 or 1300 788 141 (log faults 24x7)
Exetel Support Portal

CoreyPlover
Volunteer Site Admin
Posts: 5922
Joined: Sat Nov 04, 2006 2:24 pm
Location: Melbourne, VIC

Re: .html extension required

Post by CoreyPlover » Sun Nov 23, 2008 3:11 pm

damian wrote:That may be how YOU set it up, but if that were the general case there would be an awful lot of 404's out there. Next your going to suggest every url has to be prefixed with http:www.

The shortened file name worked before, it doesn't now. Most "consumer" webservers are set up to interpret the shorter file name and add the extension, in fact several common extensions. If they didn't then anyone pointing to the page would have to get the url dead right. How often would that fail ?
I think you need to start paying much more attention to your URL's and web addresses:
  • Leaving off www. can break pages as there are many domains which redirect, say, http://www.*.com differently to http:// *.com
  • Similarly, sites that specific require secure connections have http://www.*.com differing from https://www.*.com
  • Notwithstanding either of the trivial and rare points above, leaving off the extension on a web page is going to break a page 9 times out of 10 as it will try to open the URL as a directory, not a file. I think you are greatly confusing the issue of optional extensions because of sites like Wikipedia that use, say, "http://en.wikipedia.org/wiki/Exetel" as a page name. The reason why these URLs work is that they dynamically translate them to the *proper* web site of http://en.wikipedia.org/w/index.php?title=Exetel (note the .php extension) without you realising. Try http://en.wikipedia.org/w/index?title=Exetel (note the ".php" is missing) and see what you get
  • Even changing the case on web pages will break things. Try http://en.wikipedia.org/w/index.PHP?title=Exetel if you don't believe me
Bottom line, if you are developing web pages, you *need* to have filenames, urls and hrefs "dead right" in terms of protocol & subnet (unless you are using relative path names) plus extensions & case-sensitivity if you want to guarantee it will work properly. Otherwise, you are simply being lazy and not conforming to proper HTML standards

Dazzled
Volunteer Site Admin
Posts: 6003
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: .html extension required

Post by Dazzled » Sun Nov 23, 2008 4:42 pm

I think damian might actually be wanting some sort of specified MIME-type map or multiview negotiation by the server (mod_negotiation) , but I can't imagine anyone expecting that behaviour as default.

austdata
Posts: 629
Joined: Wed Apr 25, 2007 12:38 am
Location: Melbourne

Re: .html extension required

Post by austdata » Sun Nov 23, 2008 11:01 pm

Damian - Mate,
Calm down, no web browser will ever pick out a file that doesn't have an accepted suffix, unless an absolute address is used. Not now, and not in the past. Exetel didn't change the rules, the web site either had acceptable suffixes or it they were added when the pages were browsed.

I've not heard of adaptive suffixes before but I don't suppose it's impossible. Can't imagine why it would be used or what it would achieve.

Given that most problems in IT are user errors I'd be surprised that this is any different. It doesn't take very much to confuse Windows or DOS, is it possible the web site files weren't entirely Windows/DOS compatible? If so, Windows/DOS may have cut the suffixes off.

Post a link to your original site and I'll have a look and see what the file names are.

Cheers,

Mike
The views I present here are not necessarily those from my brain.
Exetel's support number outside Sydney: 1300 788 141 NOTE: I do not work for Exetel.

Dazzled
Volunteer Site Admin
Posts: 6003
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: .html extension required

Post by Dazzled » Mon Nov 24, 2008 7:20 am

Austdata, strange and fiddly things can be done with the mod_negotiation module, but are improbable unless the server belongs to the web site owner - http://httpd.apache.org/docs/2.2/conten ... ation.html It is certainly easier to code correctly.

SysAdmin

Re: .html extension required

Post by SysAdmin » Mon Nov 24, 2008 3:16 pm

damian wrote:Probably a brainless question but anyway.

So I spent hours extracting my old files from the old server and ftping them up to the new one. My pages are deliberately dead simple. There is just one problem, they don't seem to load unless you include the file extensions. So a page that is say 750S.html used to load if you typed: http://www.whatever/750S now requires http://www.whatever/750S.html
An easy way to get something similar to this would be to make a dir for each of those pages and then move the html file as an index.html into that (as well as supporting images).

Andrew

Post Reply