GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   htaccess? (https://gfy.com/showthread.php?t=789692)

strongdong 12-05-2007 01:10 AM

htaccess?
 
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 :(

AdPatron 12-05-2007 01:14 AM

First you need to make sure apache (if you're on a linux server) was configured with RewriteEngine on. If it is, then do a search on google for RewriteEngine and you'll get tons of info on how to stop hotlinking.

draude 12-05-2007 01:15 AM

try this one -> http://www.javascriptkit.com/howto/htaccess10.shtml

V_RocKs 12-05-2007 02:03 AM

Depends on are you going to have a white list or a black list?


In any case, here is mine:

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]

Notice mine is a white list of allowed sites.

strongdong 12-05-2007 02:00 PM

Quote:

Originally Posted by V_RocKs (Post 13472596)
Depends on are you going to have a white list or a black list?


In any case, here is mine:

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]

Notice mine is a white list of allowed sites.

so this allows hotlinking from those sites, but disallows it for all others?

ne0 12-05-2007 02:07 PM

Quote:

Originally Posted by strongdong (Post 13474948)
so this allows hotlinking from those sites, but disallows it for all others?

yes, but it will allow blank referrers too.
this line:
Code:

RewriteCond %{HTTP_REFERER} !^$
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.


All times are GMT -7. The time now is 11:17 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123