Showing posts with label Hotlinking. Show all posts
Showing posts with label Hotlinking. Show all posts

Sunday, 17 August 2014

Disable Hotlinking Images from Searchengines with htaccess

The following code is used to prevent HotLinking to jpg, jpeg, gif, png, and bmp file types.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?your-websitename.com/.*$ [NC]
RewriteRule .(jpg|jpeg|gif|png|bmp)$ - [F]