OK here's my problem. I'm trying to get a problem with image hotlinking under control. What I'd like is to allow linking to thumbnails but only allow the fullsize images to be served via another page. What I'd like is to allow all request to /thumbs/(1-99)/*.jpg but redirect all calls to uploads/(1-99)/*.jpg to view_image.php while allowing all calls to any other existing php page on the site. I thought it would be something like this but I've tried many variation on the standard denying hotlinking .htaccess scripts I've got and they work to a point but I can't seem to combine them to perform the above? Can someone please put me out of my misery or point me to a good mod_rewrite tutorial!!! RewriteCond %{REQUEST_FILENAME} uploads/(.*)/(.*)\.(gif|jpe?g|png)$ [NC] RewriteCond %{HTTP_REFERER} !^mysite.com$ RewriteRule (.*) /view_image.php?/$1 [R,NC,L]
Basically, I want to allow hotlinking from one directory but redirect all calls to images in other directories via a php page.