Hi,
I'm quite new to using .htaccess files and am trying to set mine up to forbid hotlinking. The code I'm using is:
RewriteCond %{HTTPREFERER}!^$
RewriteCond %{HTTPREFERER}!^http://(www.)?caeus.com/.*$ [NC]
RewriteRule .(gif¦jpg¦jpeg¦png)$ http://www.caeus.com/errors/angryman.png [R,L]
However I have a variety of subdomains set up, and if I try to access images through them, it thinks it's another site and replaces them with my angryman image.
If someone could tell me how to modify my code (and explain if you can - I want to learn) so that it just allows any domain ending in caeus.com (ie. products.caeus.com, hosted.caeus.com etc.) then I'd be very grateful.
(Also... can I set more than one domain that it allows? Eg. let it allow ebay.co.uk as well - so that I can host photos and use them on there?)
Thanks.
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).