I have this little bit of code in the .htaccess file in my /img directory on my
website, the purpose of which is to keep people from hotlinking onto any GIF
files (btw we're talking about Apache):
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://mydomainname.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomainname.com/.*$ [NC]
RewriteRule .*\.gif$ - [G]
I would like to add the capability to prevent JPG or PNG hotlinking as well.
Anyone know how to do that? Do I copy everything from the first RewriteCond
thru the [G], and just supply the new file type instead of .gif? Any help
would be appreciated. Thanks :)
--
Dan
GoofyGraffix.com
Post a reply to this message
|