Protection against hotlinking

Started by mario, January 06, 2009, 05:44:46 PM

Previous topic - Next topic

mario


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?your-domain\.tld(/.*)?$ [NC]
RewriteRule \.(gif|jpe?g|png|php|GIF|JPE?G|PNG|PHP)$ - [F]


maybe helpfull

Gregg


mario

if someone create a link directly to the picture or tries to include the picture in his page apache does not allow that and redirects to your front page (your-domain.tld)