Mailing List Archive

YAS
Yet another suggestion...

Now that we have content negotiation, this should be feasible...

Some webmasters will not want to let Joe Average run cgi scripts
or set up aliases etc. So how does poor Joe redirect his popular page ?
he has to make a HTML document which does it for him :-(

Now what if Joe could write a file to contain,

Status: 302 Over there
Location: http://somewhere.over.the/rainbow/

<HTML><TITLE>gone</TITLE><H1>Boo hoo, my page have temporarily
move to <A HREF="http://somewhere.over.the/rainbow/">another site</A></H1>


He'd save this file in index.asis and rename index.html to something else.
Then with a flick of the wrist he'd setup a map file to get / to pick
up index.asis.
.asis would, in a previous episode, have been defined as a special (and new)
MIME type for Apache, and this new type would have the effect of having the
file read as if it were cgi-output (with the safety checks that adds).

So Joe now redirects all requests from ~Joe.Average/ to
http://somewhere.over.the/rainbow/

Joe and the webmaster live happily ever after.

robh.
Re: YAS [ In reply to ]
>
> >Some webmasters will not want to let Joe Average run cgi scripts
> >or set up aliases etc. So how does poor Joe redirect his popular page ?
>
> A simple solution; allow Redirect in .htaccess, but only for URLs below
> that directory.

True, it could be done that way, however the new idea I introduced

- a mime type that the server sees as "send file as is"
i.e. the file should have it's own HTTP headers

is a really simple and (I think) inexpensive thing to add, which
can be used for other things too.

I'm going to look into writing a patch for this, 'cos I think
it'll be useful, even if we fix redirection on a directory basis
in some other form.


robh
Re: YAS [ In reply to ]
>Some webmasters will not want to let Joe Average run cgi scripts
>or set up aliases etc. So how does poor Joe redirect his popular page ?

A simple solution; allow Redirect in .htaccess, but only for URLs below
that directory.

David.
Re: YAS [ In reply to ]
> - a mime type that the server sees as "send file as is"
> i.e. the file should have it's own HTTP headers
Ahh, a file version of an nph- script. (Aside: why isn't there a magic mime
type for nph scripts?) Yes, not a bad idea. Though we really should get
round to (optionally) parsing META tags in the html HEAD.

David.