![]() |
Allowing a domain to hotlink you
Ok, just used the .htaccess in the FAQ section, and stopped some hotlinkers. :D But I have one domain that I use for picposts, so I want to allow some domains to hotlink me. How do I modify that .htacess to allow that?
this is what I have ErrorDocument 404 http://www.mydomain.com/404.shtml RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*mydomain\.com(:[0-9]+)?(/.*)?$ [NC] RewriteCond %{HTTP_REFERER} !^http://(.*@)?1\.2\.3\.4(:[0-9]+)?(/.*)?$ RewriteRule .*\.(asf|mpg|mpeg|wmv|avi|rm|gif|jpeg|jpg|zip)$ - [NC,F,L] how do I add in domains to that that are ok to hotlink? |
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*otherdomain\.com(:[0-9]+)?(/.*)?$ [NC]
add as many of these as you need above the RewriteRule line with the domains that you want to allow |
when I have questions like that, I just call BrianH at webair... easy :)
|
Thanks sparky! :)
Quote:
|
Thought I'd pass this along, Mike at Phatservers sent me this. :) The .htaccess generator that is posted in other threads was 404, one of the reasons I started this thread, and this is another good generator.
http://www.htmlbasix.com/disablehotlinking.shtml |
Yeah I know that place I use has been 404 alot latly. Heres another one, I love the huge amount of options. Most generators do standard, username password, bot blocking etc. This is nice
http://cooletips.de/htaccess/ |
Hi RedCherry
Can you show me a movie file that you have protectd with this: ErrorDocument 404 http://www.mydomain.com/404.shtml RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*mydomain\.com(:[0-9]+)?(/.*)?$ [NC] RewriteCond %{HTTP_REFERER} !^http://(.*@)?1\.2\.3\.4(:[0-9]+)?(/.*)?$ RewriteRule .*\.(asf|mpg|mpeg|wmv|avi|rm|gif|jpeg|jpg|zip)$ - [NC,F,L] If anyone has any type of movie file protected with htaccess I would like to try our test on it. |
All times are GMT -4. The time now is 05:13 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc