I want to allow hotlinking for some domains but block hotlinking for all others for .flv files...anyone know how to do this? antihotlinking.com does not seem to work
htaccess?
Collapse
X
-
Tags: None
-
-
Depends on are you going to have a white list or a black list?
In any case, here is mine:
Notice mine is a white list of allowed sites.Code:RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?rhinosthumbs.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?rhinoslinks.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?americastgp.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?gofuckyourself.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(.+)?yahoo.(.+)(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(.+)?google.(.+)(/)?.*$ [NC] RewriteRule .*\.(flv)$ - [F,NC]Comment
-
so this allows hotlinking from those sites, but disallows it for all others?Depends on are you going to have a white list or a black list?
In any case, here is mine:
Notice mine is a white list of allowed sites.Code:RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?rhinosthumbs.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?rhinoslinks.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?americastgp.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?gofuckyourself.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(.+)?yahoo.(.+)(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(.+)?google.(.+)(/)?.*$ [NC] RewriteRule .*\.(flv)$ - [F,NC]Comment
-
yes, but it will allow blank referrers too.
this line:
if you want to disable any access to it that is not from your domain you should consider removing that too. But note that there are some anti-viruses that will clean up the referrer, not a lot, but could cause your image not to show up for a handful of people.Code:RewriteCond %{HTTP_REFERER} !^$hai2uComment

Comment