okay... I have created a .htaccess code and added an image to load should yet another thief steal my images... I have about 10 images stolen every other day... and I spend most of my time renaming my images... so decided that maybe adding a .htaccess code would save me a lot of trouble Now the trouble is... I can't seems to make it work.... I have read just about everything there is on the subject... but they omit to tell you how to load and where to load.. both the .htaccess code and the refer image. Please can someone shed some light on this issue... If I drop my .htaccess code in my images directory... where do I drop my image url... as the image does show in the browser http://www.elvis-presley-biography.com/DO-NOT-STEAL.jpg but alas it doesn't work to stop hotlinking to images on my site. Help, please .... thanks
I have tried that... as I only want to stop hotlinking to my images... I was told that you need to separate the .htaccess code from the directory where the images is located... Please more information... I have two directories, one where my .html files are and the other called images... where all my images go.... Where do I upload each of the codes... thanks
I have a .htaccess question online myself at the moment so am novice with .htaccess. My disable hotlinking code is in my .htaccess file in my root directory. It does not show a forbidden or some such image. If some one hotlinks they get the gray box with red x in corner. You must have a more advanced code than I. I would try .htacceess in root directory, and image in image directory. The code I am using is: RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com$ [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC] Good luck. Shannon
... if I do that do I have to change my refer image code to http://www.elvis-presley-biography.com/images/DO-NOT-STEAL.jpg because that where I will transfer it to... at the moment I have the .htaccess code in the images directory and the refer image in my .html directory... when I had it the other way around it still didn't work... need an expert to talk me through how best to solve this problem...
Someone called for a mod_rewrite expert? Simple hotlink protection .htaccess rules. # Kill hotlinks -- /hotlink.png is the image to be served to the hotlinkers. # You can find an excellent example image at t bg rl.com RewriteCond %{REQUEST_URI} !^/hotlink.png$ RewriteCond %{HTTP_REFERER} !^$ # where example.com is your domain RewriteCond %{HTTP_REFERER} !^http://example.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://.*.example.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://otheralloweddomain.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://.*.otheralloweddomain.com.*$ [NC] # add as many domains above as you want to allow # Google Cache/Images/etc. RewriteCond %{HTTP_REFERER} !^http://images.google.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://216.239.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://64.233.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://66.102.*$ [NC] # and now kill the b stards -- use your own URL RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$|.*[Pp][Nn][Gg]$ http://www.example.com/hotlink.png [L,R=302] Make sure the image URL at the top and the bottom match up!
Have no idea what you are trying to say... my problem is where oh where to a drop the .htaccess code and where of where do I drop the image code I want to replace it with... in my directories? Tried your example... and I get an error message.. no image no nothing please make this simple... for the novice... thanks
You put it in your top level web directory...but you change example.com to your own domain first! You can also change hotlink.png to your other image name too, but you have to change it at the top and the bottom.