Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Newbie Questions (http://www.greenguysboard.com/board/forumdisplay.php?f=5)
-   -   htaccess help (http://www.greenguysboard.com/board/showthread.php?t=36282)

Licker4U 2006-11-22 05:49 AM

htaccess help
 
I keep seeing in my stats a site that was hotlinking one of my images even though my htaccess prevents the image from appearing on their site. (just a box with a red x in it). My question: How can I make a different image appear on their site? You know, the really nasty one some people use.

This is what I have in place now:

RewriteEngine on
RewriteCond %{HTTP_REFERER} fusker [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?xanga [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?distime [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?devilfinder [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?filez [NC]
RewriteRule .*\.(asf|mpg|mpeg|wmv|avi|rm|gif|jpeg|jpg|zip)$ - [NC,F,L]

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*fuckpage\.com(:[0-9]+)?(/.*)?$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*fannyfuck\.com(:[0-9]+)?(/.*)?$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*best-wet-pussy\.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]

AddHandler server-parsed .htm .html


order allow,deny
deny from 62.212.84.16
allow from all

Fonz 2006-11-22 07:29 AM

I use this piece of code to show the suckers my hotlink image on extremelyhotbabes.com

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?extremelyhotbabes.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.extremelyhotbabes.com/grgrgrg.gif [R,L]

Licker4U 2006-11-22 07:41 AM

Thanks, I think I can modify that to show a nasty image...like a turd in a toilet or something...

jayeff 2006-11-22 07:46 AM

This does the same, but it allows some of the image searches to show results and includes a response to non-image hotlinking:
Code:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://([^@\/]+@)?([a-z0-9-]+\.)*yourdomain.com(:80)*(/.*)* [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !msn\. [NC]
RewriteCond %{HTTP_REFERER} !yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteRule (.*) /hotlink.png [R]
RewriteCond %{REQUEST_FILENAME} !^.*jpg [NC]
RewriteCond %{REQUEST_FILENAME} !^.*gif [NC]
RewriteCond %{REQUEST_FILENAME} !^.*png [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://([^@\/]+@)?([a-z0-9-]+\.)*yourdomain.com(:80)*(/.*)* [NC]
RewriteRule (.*) /somepage.php [R,L]

hotlink.png and somepage.php are assumed to be in the root directory in this example and it also intended to allow type-ins, javascript access etc. You can modify/remove the relevant lines as you wish...


All times are GMT -4. The time now is 01:18 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc