httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Ruggeri <DRugg...@primary.net>
Subject Re: [users@httpd] Rewrite Rule Help (again)
Date Wed, 11 Jul 2012 02:46:58 GMT
On 7/10/2012 9:32 PM, Chris Arnold wrote:
> RewriteEngine On
> > RewriteCond %{HTTP_HOST} !^update.domain.com$ [NC]
> > RewriteRule ^/$ http://private.ip.address [R,L]

You may need to change the R to a P:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^update.domain.com$ [NC]
RewriteRule ^/$ http://private.ip.address/ [P,L]

This turns the rule into a proxy to that private IP, assuming that is
what you are trying to accomplish. Also, be sure to match slashes on
your rule.


Finally, if you want URLS other than the root to be proxied, you may
need to capture the URI like so:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^update.domain.com$ [NC]
RewriteRule ^/(.*)$ http://private.ip.address/$1 [P,L]



-- 
Daniel Ruggeri


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message