httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] Problem using mod_rewrite and mod_proxy
Date Mon, 26 Jul 2004 16:06:59 GMT
On Mon, 26 Jul 2004 17:48:55 +0200, Massimiliano Panichi
<m.panichi@infogroup.it> wrote:
> Hi,
> 
> I would like to configure my reverse proxy in order to
> display different pages for some ip addresses. This is my configuration

>     RewriteCond /transparent.gif -U
>     RewriteRule /transparent.gif  /lavori/transparent.gif [P,L]
> 
>     RewriteCond %{REMOTE_ADDR}      ^192\.168\.52\.131$  [OR]
>     RewriteCond %{REMOTE_ADDR}      ^192\.168\.52\.25$  [OR]
>     RewriteCond %{REMOTE_ADDR}      ^192\.168\.52\.36$
>     RewriteRule ^.*  /lavori/Lav_in_corso_eProc_prod.htm  [P,L]
> 
>     ProxyPass           /       http://www.sun.com/
>     ProxyPassReverse    /       http://www.sun.com/
> 
> But it works only when I delete ProxyPass and ProxyPassReverse lines ?

This configuration seems a little bizarre, since you are proxying to
content on the same server.  Why not just deliver the content
directly?

Anyway, if what you want is to proxy to sun.com if none of the other
conditions are met, then simply replace the ProxyPass line with
RewriteRule ^/(.*) http://www.sun.com/$1 [P]

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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message