Wordpress rewrite image path
- by Brad
I've got a website that is running WordPress. It has several pictures that I am retrieving from a datafeed. The images from the datafeed are at locations like:
http://image4.example.com/640/examples/example.jpg
http://image4.example.com/640/example.jpg
The image4 and 640 locations can change. I want to rewrite the images to where they show as from my website.
I've tried:
rewritecond %{HTTP_HOST} !^image4.example.com$
rewriterule ^([^/]+)$ http://image4.mywebsite.com/$1 [L,R=301]
but it doesn't work. I don't know much about Mod Rewrite. any help would be appreciated, and no I'm not hijacking the images, i have permission to use them and the bandwidth.
Thanks
-Brad