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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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] |
|
|||
|
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 | |
|
|