I have got an internet site that's running WordPress. It's several pictures that i'm locating from the datafeed. The pictures in the datafeed are in locations like:

http://image4.example.com/640/examples/example.jpg
http://image4.example.com/640/example.jpg

The image4 and 640 locations can alter. I wish to rewrite the pictures to where they reveal as from the website.

I have attempted:

rewritecond %{HTTP_HOST}     !^image4\.example\.com$  
rewriterule ^([^/]+)$ http://image4.mywebsite.com/$1 [L,R=301]

however it does not work. I'm not sure much about Mod Rewrite. any help could be appreciated, with no I am not hijacking the pictures, i've permission for their services and also the bandwidth.

Thanks -Kaira

The like your site you need to make use of an image like <img src="http://image4.mysite.com/image.png">, that ought to then be offered using their servers? You will want to turn back logic of the current rules: you now match the host image4.example.com, and redirect these to image4.mywebsite.com, you would like the alternative.

Bear in mind when you redirect the demands, the consumer can continue to observe that the pictures range from other domain names. The only method to solve this really is by proxying the requests through your server, however you'll lose the rate profit from another servers, and employ up more bandwidth yourself.

Can you really setup your DNS to ensure that image4.mywebsite.com eventually ends up at their server? This may require their co-operation (if it's an online host, for instance), however i think this is the very best of both mobile phone industry's: customers see from your domain, however, you get the advantages of hosting the pictures elsewhere.

You can find more helpful solutions should you add the "apache" tag, this isn't a real WordPress(-only) question.