On Thu, 2009-04-09 at 12:39 +0100, Chris G wrote:
A much simpler question than I originally envisaged (the more complicated one may follow).
What apache2 directive allows URLs to omit the trailing .html? Half of my pages work without the html and the other half don't and for the life of me I can't find a directive anywhere that would affect this.
E.g. I can refer to either:-
http://home.isbd.net/sidebar.html http://home.isbd.net/sidebar
and they both work
but if I go to:- http://home.isbd.net/manual/en/mod/core.html http://home.isbd.net/manual/en/mod/core
The first one works but the second one (without the .html) gives a page not found error.
Chris,
I know this is not a complete answer but I think this has something to do with automatic type selection.
The HTTP standard has the facility for the browser to request a document and, rather than specify the type via a file extension, specify the types of content it is prepared to accept, possible weighted by preference, via the Accept: header and then let the web server serve up whatever content it can find that is acceptable.
To do that, Apache would map the MIME types specified by the browser to file extensions and then search for content in preference order by appending the extension and checking if the file is there.
This still does not say why it works for one example and not for the next but at least it may give you a start point for some further research.
Regards, Steve.