Prevent hotlinking of attachments

Posted by reggie on Pro Webmasters See other posts from Pro Webmasters or by reggie
Published on 2011-09-21T06:02:30Z Indexed on 2012/03/26 17:39 UTC
Read the original article Hit count: 307

Filed under:
|
|

People are able to embed my forum's attachments (vbulletin). I tried to create an htaccess rule for the hotlinking, but it did not work.

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com.*$ [NC]
RewriteRule attachmentid=\d+(\&d=\d*)?|\.([Gg][Ii][Ff]|[Jj][Pp][Gg])$ http://mydomain.com/antihotlink.jpeg [R]

Is it not possible to check for numbers in regular expressions in htaccess files?

© Pro Webmasters or respective owner

Related posts about apache

Related posts about htaccess