Apache Redirect question

Apache Redirect question

Post by Richard Ko » Wed, 22 Aug 2001 21:52:03



Hi All,

I'm trying to redirect all requests for files in one directory to a
directory on another server as such:
RewriteRule ^/TheDirectory(.*)
http://www.otherserver.com/TheOtherDirectory$1 [P,L]
This works, but I would like to keep the first URL in the location
bar.
So, I would like to see www.thisserver.com/TheDirectory once I'm
redirected to the other server.
Is this possible, or am I forced to use a frameset here?
Any ideas?

R.

 
 
 

Apache Redirect question

Post by adam » Wed, 22 Aug 2001 22:27:18



> I'm trying to redirect all requests for files in one directory to a
> directory on another server as such:
> RewriteRule ^/TheDirectory(.*)
> http://www.otherserver.com/TheOtherDirectory$1 [P,L]

This statement should proxy the request to the other server leaving the
browser to only contact www.thisserver.com.  This is not a redirect.  A
redirect would change the URL listed in the Location: bar of the
browser.  So for clarity here, you don't seem to want a redirect and the
code you have should work.

Quote:> This works, but I would like to keep the first URL in the location
> bar.
> So, I would like to see www.thisserver.com/TheDirectory once I'm
> redirected to the other server.
> Is this possible, or am I forced to use a frameset here?

Again, this should work.  Is there anything in the HTML on
www.otherserver.com/TheOtherDirectory that has absolute links?  If so,
apache's mod_rewrite/mod_proxy doesn't rewrite the HTML code, so if
there are absolute links in the site you're proxy'ing the browser will
show that in the location bar after clicking one of the links.

--
-adam                 | "Be liberal in what you accept, and
Systems Administrator |  conservative in what you send"
Indiana University    |      -Jon Postel
Bloomington, Indiana  |

 
 
 

1. Apache Redirect Question

Hi Guys.

I am just starting to use Apache and have a small problem that I can't
figure out.

I have read the web sites about using redirect but it still isn't sinking
in.

What I want to do is redirect one URL to another URL on a different server.

On my server I have a domain name www.bigwig.com and I want to redirect it
to www.telstra.com/~liz

In my httpd.conf file I have added ...
Redirect /bigwig    http://www.telstra.com/~liz

I am sure this is wrong but all I can find is on how to redirect a URL which
has a file in it but not just a URL.
On my server the domain name bigwig.com does not have any web space
allocated to it.
It's just parked here.

Could someone please point me to a basic step by step web site were I can
learn what to do.

Thanks heaps..
Liz

2. IBM PS/ValuePoint X setup?

3. Apache redirect question

4. ATI 3D Rage LT Pro & xfree86 4.01 problem

5. Apache Redirect question - is there a way to do ...

6. Linux on a 40gig harddrive unsupported by BIOS

7. Apache Redirect/ReWrite for redirecting old->new domains?

8. Why bind() leaves the ***.sin_port equal to 0?

9. Apache newbie- question on redirect

10. Apache question: redirecting proxy requests

11. Apache "redirect" question

12. Apache: redirect versus SSI config question