httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] mod_rewrite: remembering environment variables
Date Thu, 30 Nov 2006 20:09:38 GMT
On 11/30/06, A. K. <> wrote:
> iptables redirects to the VirtualHost which rewrites to the script housed on
> localhost. The script does some processing then "re-requests" the original
> request based on the parameters and query string passed to it.
> will display just fine except for the logo image which gets
> re-written to
> If I add a third rule, "RewriteRule (.*)$1 [P]", the
> image is fetched appropriately. The question is how do I dynamically
> determine what the appropriate HTTP_HOST should be?
> Is my approach "fixable"? Or should I be attacking this differently?

Seems crazy to me.  I guess you are using this as a proxy server?  Why
not use a real proxy with some filtering (if necessary) to make any
changes to want.

And I don't understand your setup because you seem to imply that there
is a difference between SERVER_NAME and HTTP_HOST.  Why is that the
case?  The SERVER_NAME is already passed in the request, so why not
use that?

Anyway, back to your original question, environment variables won't do
you any good because you are using external redirects.  That means an
entirely new request will be created with entirely new environment
variables.  If you really need to pass the HTTP_HOST, then pass it in
the query string as you are doing with SERVER_NAME.


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