httpd-users mailing list archives

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

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 :


ProxyPass /
ProxyPassReverse /

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

RewriteEngine on
RewriteLog /path/to/logs/rewrite_log
RewriteLogLevel 100
RewriteRule ^/images/(.*) /newsite/images/$1 [L]
RewriteRule ^/html/(.*) /newsite/html/$1 [L]
ProxyPass /
ProxyPassReverse /

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.

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