|
Posted by Toby Inkster on 07/31/06 07:10
Els wrote:
> http://example.com/somewhere/
> http://example.com/somewhere
>
> Most servers though, are set up to respond to the second one as if
> there was a trailing slash, as soon as it detects that there is no file
> by the name of "somewhere".
Not exactly. In the case of a file at the second URL being not found, most
servers will firstly *check* to see if the first URL would have worked,
and if so *redirect* to it; if not, send a 404.
I've heard some early servers tried doing as you describe -- serving the
same page at "somewhere" as they did at "somewhere/", but authors found
that this broke relative links. (Consider where "logo.jpeg" would be
requested from in each case!) And so, the behaviour was changed to the one
I describe -- the redirect.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|