Good morning Brian,
thanks for your reply. Did I understand your explanation correctly?
1. Request comes in
2. Request is not considered as proxy request and hence initially not handled
by mod_proxy
3. Request is caught by mod_rewrite
4. mod_rewrite parses the headers, retrieves the values in question by regex
and stores them in environment variables
5. mod_headers modifies the headers upon the env-vars
6. Apache reverse proxies the request with the modified headers to the static
upstream server through mod_write and the bottom RewriteRule
Thank you,
Alexander
>>> [EMAIL PROTECTED] 20.05.2005 18:10:27 >>>
Yes. This is what the mod_rewrite module is for. What you need to do is
not use mod_proxy directly (i.e. ProxyPass), but do your reverse proxy
handling through mod_rewrite (the [P] flag for RewriteRule). That way,
you can use mod_rewrite to grab an HTTP header value and place it into
an environment variable. That would allow you to access that value via
mod_headers, before you go back to mod_rewrite to do the reverse proxy
call.
Here's an example...
RewriteEngine on
# Get the custom header value and store in a temporary environment
variable
RewriteCond %{HTTP:X-Custom-Header-Name} (.*)
RewriteRule .* - [E=FOO_HEADER:%1]
# We need the FOO_HEADER on the proxy side of things, so we grab
the value from the temp
# variable and add it as a new HTTP header for the upcoming proxy
request
RequestHeader add X-My-FOO %{FOO_HEADER}e
# Send our request to the proxy location
RewriteRule ^/(.*)$ http://127.0.0.1:8080/$1 [P,L]
-Brian
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]