Re: Rewrite Rule Help (again)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux