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] url masking
Date Wed, 13 Oct 2004 18:37:58 GMT
On Wed, 13 Oct 2004 10:46:41 -0700 (MST), Donald Raikes <don@draikes.com> wrote:
> > You would need to use a "reverse proxy".  See the ProxyPass and
> > ProxyPassReverse directives in the mod_proxy docs.
> Ok, but how does that work when I am using redirectmatch to redirect to
> the other server?
> 
> My Virtualhost section looks like:
> <VirtualHost *>
>     ServerAdmin don.raikes@oracle.com
>     ServerName staccessibility.us.oracle.com
>     RedirectMatch (.*)\*.uix$ http://access.us.oracle.com:8888/st-acc2/$1.uix
>     Redirect permanent / http://access.us.oracle.com:8888/st-acc2/home.uix
> #    ErrorLog logs/access.us.oracle.com-error_log
> #    CustomLog logs/dummy-host.example.com-access_log common
> </VirtualHost>

You don't use Redirect(Match).  Redirect(Match) is used to tell the
client to fetch the document from the other server.  This necessitates
that the client be given the real addresses.  If you want to hide the
address from the client, then you need to have the intermediate server
grab the content and return it to the client.

Perhaps you are asking how to handle the regular expressions.  In this
case, you need to use the proxy format of the rewriterule directive. 
A quick example to get you started:
RewriteEngine On
RewriteRule   (.*)\.uix$ http://access.us.oracle.com:8888/st-acc2/$1.uix [P,L]
RewriteRule ^(.*) http://access.us.oracle.com:8888/st-acc2/home.uix$1
ProxyPassReverse / http://access.us.oracle.com:8888/st-acc2/

If you have troubles with this, be sure to use the RewriteLog to
figure out what is going on.

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