![]() |
special anty hotlink
hi
i need such antyhotlink that from other domain hotlink will impossible but from my own domain will possible? do you know how to do this? |
it's easy with htaccess
Code:
RewriteEngine on YOUR_SITE_IP = your server ip 123.123.123.123 YOUR_SITE_DOMAIN = www.my_cool_domain.com OTHER_SITE_DOMAIN - other domain that you allow hotlink |
All the rules are trickable as they are shown here and almost everywhere on the web. Always terminate the condition line by something like this --
Code:
(/|\?|$) Code:
RewriteCond %{HTTP_REFERER} !^(wy[sc]iwyg://[0-9]*/)?http(s)?://YOUR_SITE_IP(/|\?|$) [NC] http://www.yourdomain.com.my-evil-hotlinkingdomain.com It is not a problem to setup a vhost which will fit your regexp needs and this mistake is the worse since it is highly predictable. Another good idea should be allowing access to pictures from image searches and probably from local stored pages too. Code:
# Allow Saved Pages Oh my god I did it! My first post here ... (edited to add the code tags) |
yeap
dgraf is right about that ("always terminate the condition line") EDITED: it can be easy tricked with vhosts when there is no termination |
All times are GMT -4. The time now is 08:50 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc