httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LECONTE Laurent ROSI/SICOR" <>
Subject RE: [users@httpd] Mod_rewrite and mod_proxy
Date Wed, 09 Nov 2005 16:36:31 GMT

Actually, writing my last mail gave me an idea : I scratched the ProxyPass directive altogether,
and added a 'dummy' Rewrite for the correctly-written URLs. Therefore my conf now looks like
this :

RewriteRule ^/newsite/(.*)$1 [P,L]
RewriteRule ^/html/(.*)$1 [P,L]
#no more ProxyPass
ProxyPassReverse /

This takes care of my problem. However, the bad URLs (,
although correctly redirected, aren't updated in the browser address bar (I'd like them to
become Any idea how I could correct that ?

Laurent Leconte

-----Message d'origine-----
De : Simon Irwin []
Envoyé : mercredi 9 novembre 2005 17:27
À :
Objet : Re: [users@httpd] Mod_rewrite and mod_proxy

Laurent -

did you test whether mod_rewrite will work on any requests if you remove the ProxyPass directives?
 it would be good to find out if the rewrite engine is basically working for you.

if you can prove the rewrite engine works, perhaps you could avoid using ProxyPass/ProxyPassReverse
altogether and instead implement of all your redirects using only mod_rewrite's RewriteRule


On 11/9/05, LECONTE Laurent ROSI/SICOR
<> wrote:
> Hello all,
> I've configured an Apache 2.0 instance to work as a reverse proxy,
> listening on and redirecting to
> The relevant lines of the httpd.conf file are :
> Listen
> <VirtualHost>
> ProxyPass / ProxyPassReverse /
> </VirtualHost>
> This works fine, and all our URLs (which look like
> are correctly rerouted
> to
> However, we'd like to maintain backwards-compatibility with the old
> site. This means that the old URLs such as
> or
> should be rewritten as
> or
> BEFORE going through
> mod_proxy. Accordingly, I've tried modifying the VirtualHost section
> so
> :
> <VirtualHost>
> RewriteEngine on
> RewriteLog /path/to/logs/rewrite_log
> RewriteLogLevel 100
> RewriteRule ^/images/(.*) /newsite/images/$1 [L] RewriteRule
> ^/html/(.*) /newsite/html/$1 [L] ...
> ProxyPass / ProxyPassReverse /
> </VirtualHost>
> This, however, doesn't work. The log file is created, but stays
> desesperately empty, and all the requests to
> are directly rerouted to
> I've tried replacing [L] by [P] or [QSA] in the rules, and placing the
> Rewrite directives outside of the VirtualHost section, but that
> doesn't change anything. I've read in the archive that using [P] and
> removing the ProxyPass directive should work, but that would break the
> redirection for the new URLs.
> The httpd -l command shows mod_rewrite.c, so the module is indeed here.
> Any thoughts on what I'm doing wrong ?
> Thanks in advance.
> Regards,
> Laurent Leconte

Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis
a l'intention exclusive de
ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. Le Groupe France Telecom decline toute
responsabilite au titre de
ce message s'il a ete altere, deforme ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et d'avertir
This message and any attachments (the "message") are confidential and intended solely for
the addressees. Any unauthorised
use or dissemination is prohibited.
Messages are susceptible to alteration. France Telecom Group shall not be liable for the message
if altered, changed or
If you are not receiver of this message, please cancel it immediately and inform the sender.

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