httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Peng" <>
Subject Re: [users@httpd] rewrite based on Accept-Encoding header
Date Fri, 29 Feb 2008 02:38:30 GMT
On Thu, Feb 28, 2008 at 10:35 PM, Joshua Slive <> wrote:
> On Thu, Feb 28, 2008 at 12:51 AM, J. Peng <> wrote:
>  > Can we do a rewrite based on Accept-Encoding request header?
>  >  If the request header includes "Accept-Encoding: gzip, deflate", we
>  >  rewrite it to pathA.
>  >  Otherwise rewrite it to pathB.
>  Yes. The docs are here:
>  Give it a try and come back with your best guess and a specific
>  problem description if you can't figure it out.

Thanks for the document.
I have installed httpd-2.2.8 and set the rewrite rules as:

<Location /test2>
    RewriteEngine On
    RewriteCond %{HTTP:Accept-Encoding}  gzip [OR]
    RewriteCond %{HTTP:Accept-Encoding}  deflate
#    RewriteRule ^/test2/(.*) /test/$1 [PT,L]
    RewriteRule ^/test2/(.*) /test/$1 [R,L]

It doesn't work. do you know why?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message