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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.