Stop hotlinking images in proxy

I had to add this into all my htaccess files to stop hotlinking. That mod didn’t work at all in the first post. This has stopped it totally.

Code:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?domain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png|avi|mpeg|mp3)$ /images/image.jpg [L]

Replace the domain with your domain name and the .com with your tld

And put whatever image you want for image.jpg.

Leave a comment

Your comment