httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Axel-Stéphane SMORGRAV <>
Subject RE: [users@httpd] Re: RewriteRule being ignored
Date Tue, 21 Feb 2006 17:28:35 GMT
Has the following been suggested yet ??

VirtualHost *:80>
  RewriteEngine On

  RewriteRule ^/gift/(.*)$$1
  RewriteRule ^/refer/(.*)$$1

  ProxyPass /gift !
  ProxyPass /refer !
  ProxyPass /download/
  ProxyPassReverse /download/
  ProxyPass /
  ProxyPassReverse /


-----Original Message-----
From: Joost de Heer [] 
Sent: Tuesday, February 21, 2006 4:53 PM
To: Axel-Stéphane SMORGRAV;
Subject: RE: [users@httpd] Re: RewriteRule being ignored

Axel-Stéphane  SMORGRAV wrote:
> If memory serve me right, all mod_proxy hooks execute before 
> mod_rewrite in Apache 2.0. Module ordering is irrelevant.

In that case, reverse proxying must be done with mod_rewrite, something like (untested!):

<VirtualHost *:80>
  RewriteEngine On

  RewriteCond %{REQUEST_URI} ^/gift/.*
  RewriteRule ^/gift/(.*)$$1
  RewriteCond %{REQUEST_URI} ^/gift/.*
  RewriteRule ^/refer/(.*)$$1
  RewriteCond %{REQUEST_URI} ^/download/.*
  RewriteRule /(.*)$1 [P,L]
  RewriteRule /(.*)$1 [P]

  ProxyPassReverse /download/
  ProxyPassReverse / </VirtualHost>

Possibly with a few extra RewriteCond's to avoid looping.


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