.htaccess

software development

#1

I want to restrict hotlinking of my images, but not just to that site.

I’d like *.fanworks.net to be able to link to any image (and fanworks.net if it needs a seperate statement) so I only need one copy of images common to my full site.

And I need pub21.ezboard.com to be able to link images as well. (host Maps & some pics for an RPG there.)


#2

put this into your .htaccess file:

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://fanworks.net/.$ [NC]
RewriteCond %{HTTP_REFERER} !^http://pub21.ezboard.com/.
$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.fanworks.net/.$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.pub21.ezboard.com/.
$ [NC]
RewriteRule .*.(gif|GIF|jpg|JPG)$ - [F]


#3

almost there – I need it to work from *.fanworks.net not just www.fanworks.net & fanworks.net