How To Redirect Question

How To Redirect Question

Post by Max File » Sun, 03 Dec 2000 04:00:00



I have two servers running FreeBSD and Apache 1.3.14.
The first server connects to the Internet and is on the
same network segment as the second server. The
second server uses the first server as it's gateway to the
Internet. I would like to setup things up so that when I
access a certain directory on the first server, I get
redirected to the 2nd server. All the docs I check on
redirecting do not give me exactly how I go about this.

Can someone offer some pointers here?

 
 
 

How To Redirect Question

Post by adam » Mon, 04 Dec 2000 04:00:00



> I have two servers running FreeBSD and Apache 1.3.14.
> The first server connects to the Internet and is on the
> same network segment as the second server. The
> second server uses the first server as it's gateway to the
> Internet. I would like to setup things up so that when I
> access a certain directory on the first server, I get
> redirected to the 2nd server. All the docs I check on
> redirecting do not give me exactly how I go about this.

> Can someone offer some pointers here?

If the second server isn't reachable from the internet, then you'll need
to proxy (need mod_proxy):

ProxyPassReverse /directory http://second-server/directory

or w/ mod_rewrite:

RewriteRule ^/directory(.*)$ http://second-server/directory$1 [P]

if it is reachable from the internet check the docs on Redirect or
RedirectMatch.

--
-adam                |RewriteCond %{SERVER_SOFTWARE} (Apache)

Indiana University   |RewriteCond %{REQUEST_URI} "Just Another Apache
Hacker"
Bloomington, Indiana |RewriteRule .* /index.html [PT]

 
 
 

1. Apache Redirect question

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.

2. trouble with metadevices

3. iptables redirect question.

4. Please help with IDE CDROM installation

5. I/O redirect question

6. getservbyname_r

7. Redirect Question

8. The FAQ and AIX version 3.1/3.2

9. Basic redirect question: stderr to /dev/null in cron job

10. htaccess redirect question inside...

11. a redirect question

12. Interesting IP redirect question

13. A NCSA httpd redirect question