Skip to content

Instantly share code, notes, and snippets.

@NinjaPress
Created February 25, 2012 03:15
Show Gist options
  • Save NinjaPress/1905618 to your computer and use it in GitHub Desktop.
Save NinjaPress/1905618 to your computer and use it in GitHub Desktop.
Evitando HotLinking via .htaccess no Wordpress
# Disable hotlinking of images with forbidden message
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?seu-dominio.com.br/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|mp3|flv|swf|zip|rar|mpeg|mpg|wma|wmv|pdf|xls|doc|xlsx|docx|ppt|pptx|txt|rtf)$ - [F]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment