Created
December 17, 2014 22:39
-
-
Save evemilano/efbb15107fb1b36602f2 to your computer and use it in GitHub Desktop.
Stop Hotlinking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine on | |
| # Stop hotlinking. | |
| RewriteCond %{HTTP_REFERER} !^$ | |
| RewriteCond %{HTTP_REFERER} ^https?://([^/]+)/ [NC] | |
| RewriteCond %1#%{HTTP_HOST} !^(.+)#\1$ | |
| RewriteRule \.(jpg|jpeg|png|gif|swf|svg)$ - [NC,F,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.evemilano.com/2014/12/redirezioni-e-comandi-utili-per-il-file-htaccess/