URGENT. Apache redirect failed URLs to another webserver

This is a discussion on URGENT. Apache redirect failed URLs to another webserver within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi Guys, Not sure if anyone has came across this issue before? Recently, I tried to redirect any failed URLs ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-22-2007
ozzman.s@gmail.com
 
Posts: n/a
Default URGENT. Apache redirect failed URLs to another webserver

Hi Guys,

Not sure if anyone has came across this issue before? Recently,
I tried to redirect any failed URLs to another server using apache
Rewrite as following:

RewriteEngine on
RewriteCond %{REQUEST_URI} !-U
RewriteRule ^(.+) http://serverB/$1

I test this with http://serverA/test.jpg which doesn't exist in server
A, and the jpg file will be under serverB. But this doesn't work as
expected, log shows that it pass through it tried to redirect to
http://serverB/test.jpg but then it just say "pass through /
test.jpg".

This solution is the URL redirect solution in Apache2.2 document under
"URL rewrite guide". I tried hours to get this work, but no luck.

Anybody can help me with this?

Thanks

  #2 (permalink)  
Old 06-22-2007
Paul Rubin
 
Posts: n/a
Default Re: URGENT. Apache redirect failed URLs to another webserver

ozzman.s@gmail.com writes:
> RewriteRule ^(.+) http://serverB/$1


That just does an internal redirect within the server. To send an
actual browser redirect, use:

RewriteRule ^(.+) http://serverB/$1 [R]
  #3 (permalink)  
Old 06-25-2007
ozzman.s@gmail.com
 
Posts: n/a
Default Re: URGENT. Apache redirect failed URLs to another webserver

I tried this but it doesn't work.

RewriteRule ^(.+) http://serverB/$1


Paul Rubin wrote:
> ozzman.s@gmail.com writes:
> > RewriteRule ^(.+) http://serverB/$1

>
> That just does an internal redirect within the server. To send an
> actual browser redirect, use:
>
> RewriteRule ^(.+) http://serverB/$1 [R]


 


Thread Tools
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

vB 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 10:16 PM.


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