Wordpress rewrite image path

Posted by Brad on Stack Overflow See other posts from Stack Overflow or by Brad
Published on 2010-06-06T07:37:06Z Indexed on 2010/06/06 7:42 UTC
Read the original article Hit count: 474

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

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about mod-rewrite