hausarzt |
08-07-2021 12:10 AM |
Prevent hotlinking with htaccess doesn't work
Hey guys.
A bunch of sites hotlink my media, so I wanted to prevent it with some htaccess code.
I use wordpress, so there is a bunch of other stuff in the file. I only post the stuff I added:
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(www\.)?website1\.com(/.*)*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?website2\.com(/.*)*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?website3\.com(/.*)*$ [NC,OR]
RewriteRule \.(jpeg|JPEG|jpe|JPE|jpg|JPG|gif|GIF|png|PNG|mng|MNG)$ - [F]
Somehow this does not work, as the media is still present on the external sites. What's wrong with my code?
|