Hello all, I have searched the entire forum and google, but I can't seem to get this to work. I am trying to redirect users who click on a link to a direct image such as images/file.jpg What I want to do is redirect them to mysite.com/viewer.php?file=filename.jpg instead as to prevent hot linking. Where do I need to add the htaccess file and what do I need to put in it? Any help is greatly appreciated!
Thanks for trying to help but I couldn't really find what I was looking for. I managed to get this working: RewriteEngine On RewriteRule ^([A-Za-z/0-9-]+)\.png$ http://www.faveimage.com/script.php?img=$1&type=png&ref=%{HTTP_REFERER} [L,NS] RewriteRule ^([A-Za-z/0-9-]+)\.jpg$ http://www.faveimage.com/script.php?img=$1&type=jpg&ref=%{HTTP_REFERER} [L,NS] RewriteRule ^([A-Za-z/0-9-]+)\.gif$ http://www.faveimage.com/script.php?img=$1&type=gif&ref=%{HTTP_REFERER} [L,NS] Code (markup): But now the thumbnail doesn't show. I added the appropriate code to the script.php file.