htaccess redirect
Posted by: Nef
Posted on: 2005-06-27 10:05:00
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 domain.com/img01.jpg but the image is really located at sub.domian.com/img01.jpg
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)$ http://sub.domain.com/$1 [L]
When i try to view a jpg from the directory, it takes me to sub.domain.com/jpg It doesnt put the name of the image
Thanks for any replies/views!