![]() |
Anti Hotlinking
To stop hotlinking put the follwong code in my htaccess ,
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(www\.)?fotopiccanti.it [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} ^http://.*$ RewriteRule \.(jpe?g|gif|bmp|png)$ - [F] What it ended up doing was block all images on my server , so if I made a freesite - the images that I hosted on my server would not appear, any idea why? |
I'm not an expert in these matters - but I did have a similar problem a few years ago and used the code below... but if I remember when researching - it was a different syntax dependent upon the server setup:
Code:
RewriteEngine On |
what I have in my site:
## DISABLE HOTLINKING RewriteEngine on # Options +FollowSymlinks RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?aaaaa.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?bbbbbbb.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?cccccccc.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?ddddddd.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?eeeeee.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?fffffff.com/.*$ [NC] RewriteRule \.(gif|jpg|jpeg|png|js|css)$ - [F] a,b,c,d,e,anf are exceptions |
And there is more here
|
Quote:
RewriteCond %{HTTP_REFERER} ^http://.*$ matches any request that has a referrer. So, if the referrer is not from your site, and it is not blank, and it comes from any site, block the image. Removing that one line will fix the problem. |
I tried that and still blocks my images - I only want to stop fotopicanti from linking to pics , but it seems like any requests get blocked |huh
Should save on bandwidth though |jester| |
That rule is only allowing fotopiccanti.it to link your images, so, its the reverse of what you want.
There are two ways to do it. 1) block all hotlinking allowing your domain Code:
RewriteEngine On Code:
RewriteEngine on Code:
RewriteEngine on |
All times are GMT -4. The time now is 02:04 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc