Htaccess redirect

I cant seem to get this right. Im trying to use “rewriteRule” instead of “redirect” to make it seem like images are located in the same directory, but are really on another subdomain.

EX: When you click the properties of an image on a webpage it will say the location is but the image is really located at

I can use “redirect” but the more images i have the more lines in the htaccess. I want to try and make it alot shorter. Ive done many different strings ive found but cant come up with anything that works from a webpage. after searching last night and all this morning i still cant get it, all i can find is “hot link protection” which i even tried to use.

here was something i was trying to work with.
RewriteRule .(jpg)$$1 [L]

When i try to view a jpg from the directory, it takes me to It doesnt put the name of the image

Thanks for any replies/views!

You can only do transparent URL rewriting on the same host/domain name. You’re always going to get a redirect if the target is on a different host.

Look into RedirectMatch for something this simple. It doesn’t have the overhead of mod_rewrite but you’ll still be able to use regular expressions so you won’t have to add every image individually.

If you want useful replies, ask smart questions.

Thank you for your reply and help.