Here is a problem I have been struggling with for a while.
I host a website with the address www.mywebsite.com
in server I but the images of the site come from server II (ip: 1.2.3.4) so if there are requests such as www.mywebsite.com/images/123.jpg I would like to redirect them to the image server(Server II).
I would like that requests that contain (.*jpg.*)
regex will redirect to Server II.
Using Url rewrite I added a rule:
<rewrite> <rules> <rule name="Ignore images requests" enabled="true" stopProcessing="true"> <match url="(.*jpg.*)" /> <action type="Rewrite" url="https://www.petfinder.com/wp-content/uploads/2012/11/91615172-find-a-lump-on-cats-skin-632x475.jpg" /> </rule> </rules> </rewrite>
It rewrites the request to a static image as you can see, how can I define it to go to 1.2.3.4/images/imagename.jpg?
The best solution would be if I could just ignore requests containing jpg via my host file, is there a way to that?