Hello Torsten,
I have tested your rewrite syntax like below:
<Location /unzip>
RewriteEngine On
RewriteCond %{HTTP:Accept-Encoding} gzip [OR]
RewriteCond %{HTTP:Accept-Encoding} deflate
RewriteRule ^/unzip/(.*) /gziped/$1 [PT,L]
</Location>
Sorry it can't work.
Also I checked apache's official document for mod_rewrite:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
It says the rewriting conditions on http headers include only:
HTTP headers:
--------------------------
HTTP_USER_AGENT
HTTP_REFERER
HTTP_COOKIE
HTTP_FORWARDED
HTTP_HOST
HTTP_PROXY_CONNECTION
HTTP_ACCEPT
So as I've said, you can't rewrite the request based on
Accept-Encoding header.Is it?
Thanks.
On Thu, Feb 28, 2008 at 8:30 PM, Torsten Foertsch
<[EMAIL PROTECTED]> wrote:
> On Thu 28 Feb 2008, J. Peng wrote:
>
> > no, mod_rewrite can't rewrite requests based on Accept-Encoding header.
>
> yes, something like this:
>
> RewriteCond %{HTTP:Accept-Encoding} gzip [OR]
> RewriteCond %{HTTP:Accept-Encoding} deflate
> RewriteRule ^(.*) /pathA/$1 [PT,L]
>
> RewriteRule ^(.*) /pathB/$1 [PT,L]
>
> or as an external redirect:
>
> RewriteCond %{HTTP:Accept-Encoding} gzip [OR]
> RewriteCond %{HTTP:Accept-Encoding} deflate
> RewriteRule ^(.*) /pathA/$1 [R,L]
>
> RewriteRule ^(.*) /pathB/$1 [R,L]
>
> Why do you think this wouldn't work?
>