thanks torsten.
currently I write it with PerlAccessHandler, it also works. is it
right with this handler?
no, mod_rewrite can't rewrite requests based on Accept-Encoding header.

On Thu, Feb 28, 2008 at 7:26 PM, Torsten Foertsch
<[EMAIL PROTECTED]> wrote:
> On Thu 28 Feb 2008, J. Peng wrote:
>  > I need to write an input filter based on the request headers.
>  > If request includes a "Accept-Encoding: gzip, deflate" header, I
>  > should redirect the request to /pathA.
>  > If request doesn't include that header, I should redirect the request to
>  > /pathB. (pathA and pathB are web document dirs on web server.)
>
>  I think you don't need an input filter. What you need is a PerlTransHandler 
> or
>  a PerlMapToStorageHandler that checks $r->headers_in->{'Accept-Encoding'} and
>  sets $r->filename and/or $r->uri accordingly.
>
>  This can even be done with mod_rewrite.
>
>  Torsten
>

Reply via email to