Redirecting without revealing new destination

This is a discussion on Redirecting without revealing new destination within the Apache Web Server forums, part of the Web Server and Related Forums category; I have traffic coming into one box. I then have rewrite rules set up to route them to different servers. ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-19-2006
Harlin
 
Posts: n/a
Default Redirecting without revealing new destination

I have traffic coming into one box. I then have rewrite rules set up to
route them to different servers. An example:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^gwtest.bobo.com$ [NC]
RewriteRule ^(.*)$ http://podweb1.bobo.com$1 [R,L]

By the way the url in the Rule is on a different physical server than
the one sending it. What I'd like to do is to be able to send it there
but still keeping the original referring URL affixed to the URL. This
way when it does go to http://podweb1.bobo.com/mp3s, the url instead
will say http://gwtest.bobo.com/mp3s. Is there any way to get this
accomplished using Apache?

Regards,

Harlin Seritt

  #2 (permalink)  
Old 08-20-2006
Xicheng Jia
 
Posts: n/a
Default Re: Redirecting without revealing new destination

Harlin wrote:
> I have traffic coming into one box. I then have rewrite rules set up to
> route them to different servers. An example:
>
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^gwtest.bobo.com$ [NC]
> RewriteRule ^(.*)$ http://podweb1.bobo.com$1 [R,L]
>
> By the way the url in the Rule is on a different physical server than
> the one sending it. What I'd like to do is to be able to send it there
> but still keeping the original referring URL affixed to the URL. This
> way when it does go to http://podweb1.bobo.com/mp3s, the url instead
> will say http://gwtest.bobo.com/mp3s. Is there any way to get this
> accomplished using Apache?


You may want to set up a Reverse Proxy, and especially check
"ProxyPassReverse" directive.
http://httpd.apache.org/docs/2.0/mod...oxypassreverse

Good luck,
Xicheng

  #3 (permalink)  
Old 08-20-2006
Rik
 
Posts: n/a
Default Re: Redirecting without revealing new destination

Harlin wrote:
> I have traffic coming into one box. I then have rewrite rules set up
> to route them to different servers. An example:
>
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^gwtest.bobo.com$ [NC]
> RewriteRule ^(.*)$ http://podweb1.bobo.com$1 [R,L]
>
> By the way the url in the Rule is on a different physical server

than
> the one sending it. What I'd like to do is to be able to send it

there
> but still keeping the original referring URL affixed to the URL.

This
> way when it does go to http://podweb1.bobo.com/mp3s, the url instead
> will say http://gwtest.bobo.com/mp3s. Is there any way to get this
> accomplished using Apache?


From: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
'proxy|P' (force proxy)
This flag forces the substitution part to be internally forced as a
proxy request and immediately (i.e., rewriting rule processing stops
here) put through the proxy module. You have to make sure that the
substitution string is a valid URI (e.g., typically starting with
http://hostname) which can be handled by the Apache proxy module. If
not you get an error from the proxy module. Use this flag to achieve a
more powerful implementation of the ProxyPass directive, to map some
remote stuff into the namespace of the local server.
Notice: To use this functionality make sure you have the proxy module
compiled into your Apache server program. If you don't know please
check whether mod_proxy.c is part of the ``httpd -l'' output. If yes,
this functionality is available to mod_rewrite. If not, then you first
have to rebuild the ``httpd'' program with mod_proxy enabled.

http://httpd.apache.org/docs/1.3/mod/mod_proxy.html

Grtz,
--
Rik Wasmus


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:12 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0