: Prevent hotlinking of attachments 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}
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])$ mydomain.com/antihotlink.jpeg [R]
Is it not possible to check for numbers in regular expressions in htaccess files?
More posts by @Deb1703797
1 Comments
Sorted by latest first Latest Oldest Best
You have to use RewriteCond %{QUERY_STRING} to match against the query string -- rewriterule matches only against the path component of the URL.
That's why your rule is a no-op.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.