httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <>
Subject Re: Redirect extensions
Date Tue, 05 Nov 1996 09:36:36 GMT
On Mon, 4 Nov 1996, Paul Sutton wrote:
> However, for RedirectPermanent and RedirectTemp, I'd prefer to use an
> (optional) argument rather than new directives. For example: 
>   Redirect Temp      /missing
>   Redirect Permanent /missing
>   Redirect           /missing
> (the final one defaulting to Redirect Temp). Leave RedirectPermanent and
> RedirectTemp in but document them as NCSA-compatibility directives only.

The enclosed patch extends Redirect to allow for an optional initial
argument giving the status of the redirect. So the syntax is now:

  Redirect [status] fake-name [url]

If status is omitted, defaults to Temp (302). Otherwise, status can be one
of: Temp, Permanent, SeeOther, Gone, or a numeric value. If the status
number is in the range 300 to 399, the url is required, otherwise is
should be omitted. 

The only redirect status not handled by this code is 305 Use Proxy. For
the other statuses, the Location URL consists of the url from the Redirect
directive with trailing part of the request URL appended to it. For
example, Redirect /missing handles a request for
/missing/something by returning Location: But
for 305 I suppose the Location header should not have part of the
requested URL appended to it. _If_ it would be useful to be able to return
305 status, we could always have a special case to handle it which does
not append the request URL path to the Location.

For NCSA-compatibility, the directives RedirectTemp and RedirectPermanent
are also implemented, but the use of Redirect Temp or Redirect Permanent
is preferred. 


  These four all have the same effect:

    Redirect       /missing
    Redirect Temp  /missing
    Redirect 302   /missing
    RedirectTemp   /missing

  To return a 303 See Other response:

    Rediect SeeOther /missing/

  To mark a part of the resource tree as permanently removed:

    Redirect Gone /gone

UK Web Ltd

View raw message