Jump to content

Rewrite issue


ozzmans

Recommended Posts

Hi Guys,

 

      I have a jpg called Test.jpg in serverB, index.html on serverA. index.html has <img> tage with src=serverA.com/Test.jpg.

 

      serverA doesn't have Test.jpg so I use Rewrite to redirect the link to serverB as following:

 

      RewriteEngine on

      RewriteCond %{REQUEST_URI} !-U 

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

 

      This doesn't work as I expected, anyone can help me with this?

 

Cheers

 

 

Link to comment
https://forums.phpfreaks.com/topic/56514-rewrite-issue/
Share on other sites

Basically, what I am trying to do is to redirect any failed URL to another web server called servberB.

From Apache 2.2 document  http://httpd.apache.org/docs/2.2/misc/rewriteguide.html "Redirect Failing URLs To Other Webserver"

      RewriteEngine on

      RewriteCond %{REQUEST_URI} !-U 

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

 

this should do the trick, but it didn't work for me.

 

Anybody tried to use this? Or is there any other suggestions that can redirect failling URLs to another web server?

 

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/56514-rewrite-issue/#findComment-279659
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.