On 6/24/05, Werner Schalk <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to use mod_rewrite to overwrite the environment variable > REMOTE_ADDR with the value of HTTP_X_FORWARDED_FOR because I am using Apache > 2 in a reverse / forward proxy scenario where the original IP address of the > client is not passed on to the internal Apache server:
> I have posted this several weeks ago but all the solutions did not work for > me. So I tried this mod_rewrite rule: I already explained to you that you can't do this: http://mail-archives.apache.org/mod_mbox/httpd-users/200506.mbox/[EMAIL PROTECTED] Is there some part of that you didn't understand? > > RewriteEngine On > RewriteRule ^(.*) [env=REMOTE_ADDR:%{HTTP_X_FORWARDED_FOR}] This is broken because it is trying to rewrite to the URL "[env...". You need a dash after the patter to indicate that no rewriting will occur. But as I've already told you, it won't work anyway. Joshua. --------------------------------------------------------------------- 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]