Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- attempt to block hot-linking actually blocks everything


Superman - 7:02 am on Oct 5, 2002 (gmt 0)


This .htaccess has always worked great for me in stopping hotlinkers:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*yourdomain.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*12.345.67.890/ [NC]
RewriteRule ^.*$ [yourdomain.com...] [L,R]

Replace "yourdomain.com" with, you guessed it ... your domain name, and the "12.345.67.890" with your sites IP address.

This .htaccess will protect the contents of whatever directory it is placed in from being hotlinked or linked to. I use it in my "images" directory and my "logs" directory.

-Superman-


Thread source:: http://www.webmasterworld.com/apache/33.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com