httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@apache.org>
Subject Re: HTTP headers on 'trailing slash' redirects?
Date Tue, 13 Aug 2002 23:00:49 GMT
>> Seems to me that a URL pointing to a directory always has to end with a
>> slash, and therefor it is permanent. Why would it be temporary?
>
> Hmm... I'm not entirely sure, to be honest. I wouldn't really
> consider myself experienced in any way with the inner workings of web
> servers.
> However.
> It does strike me that the object could concievably change between
> being a directory and being a file, for example, meaning that a cached
> redirect (Which is what seems to happen with a permanent redirect) is
> an annoyance.

The object is not relevant -- the original request is to a bad URL.
The server should return a 404, but for reasons of "typical user error"
it returns a permanent redirect instead in the hope that the goobers
will fix their link.

> Also, it appears that IIS (at least 5.0, which I've tested for this)
> and Apache 1.2b8 (from that changelog I found) do respond with a 302
> (temporary redirect). I'm wondering why the current Apache's behaviour
> is different, that's all.

Because we corrected the prior behavior inherited from NCSA httpd to
be more conformant to the HTTP standard.

> Also, is there any way to persuade apache to do this right with
> mod_rewrite?

You can persuade mod_rewrite to do most anything, whether it is
right or wrong.  However, it is categorically insane to insist that
the user agent always perform an unnecessary redirect just because
some goofball thinks the URL looks better without a slash on the end.
That is bad for the server and bad for the Internet in general.

....Roy


Mime
View raw message