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)
-   -   what the FUCK im doing wrong. htaccess anti hotlink help please. (https://gfy.com/showthread.php?t=423094)

nico-t 01-27-2005 12:46 PM

what the FUCK im doing wrong. htaccess anti hotlink help please.
 
im posting this here cuz noone barely goes to the webmaster q n a forum.
i got this code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?hotlinksite\.com/ [NC]
RewriteRule \.(gif|jpe?g|png)$ http://www.mydomain.com/des/test/hotlinkimg-d.gif [NC,L]

hotlinksite.com is the site that has permission to hotlink from my domain.
The anti hotlink works perfect. But that fucking substitute image just won't appear on sites that dont have hotlink privileges!
I already checked fusionx's tut but i tried everything, i looked on the fucking web all over and they give the same fucking code but it doesnt fucking work! Could someone please help me with this shit... :helpme

Manowar 01-27-2005 12:47 PM

http://altlab.com/htaccess_tutorial.html

NinjaSteve 01-27-2005 12:55 PM

are you using a linux or windows server?

nico-t 01-27-2005 01:10 PM

Quote:

Originally Posted by NinjaSteve
are you using a linux or windows server?

lol i dont know! i got a host, i pay every month a bill i aint got my own server... and i dont know shit about servers either.
Anyway, with the help of manowars link (thanks) i looked a bit closer and it seems that the image url for the hotlink image CAN NOT be your whole url where the image is hosted for some weird reason.... only the dirs. Thats prett strange if u ask me. But it works:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?hotlinksite\.com/ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ des/test/hotlinkimg-d.gif [L]


^^^ check the last line, i did it without http://www.mydomain.com/ and now it does work. Crazy shit, i hate these kinda code jobs there always something wrong that noone can explain and totally unlogical. Doom the fucking nerds that invented this haha..

nico-t 01-27-2005 01:16 PM

ok another thing:
which sites can hotlink my images! I got google in the code already like this:
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google\.com/ [NC]
but if im coorect does yahoo have the option for surfers to create their crappy personal homesites? if so, when i put this code in:
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo\.com/ [NC]
Those freeloaders on a yahoo directory website can still fucking hotlink!

Plus i want a list of people who are experienced with what sites not to block, like a list with (image) searchengines or something, so my images will still pop up there!


All times are GMT -7. The time now is 04:12 AM.

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