Hotlink Protection Using .htaccess
Ok.Here is the file:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?castlemelody.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?anotherdomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.castlemelody.com/unauthorized.gif [R,L]
I am going to put it on our images folder.
My aim is to be able to link from anotherdomain.com as well as prevent other domains from hotlinking.
It is working if i tried to hotlink from other sites.
It also works if I use http://www.castlemelody.com/
But, it seems not working if I use http://www.castlemelody.com
without the forward slash.
Same problem when I use the CPanel Hotlink Protection Feature.
Would you like to enlighten me a bit? I am not well-versed with this. And our web developer is quite busy with programming a database.
Thanks.
