Created
March 19, 2014 05:08
-
-
Save ReekenX/9635738 to your computer and use it in GitHub Desktop.
Prevent 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 | |
| #Replace ?mysite\.com/ with your blog url | |
| RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC] | |
| RewriteCond %{HTTP_REFERER} !^$ | |
| #Replace /images/nohotlink.jpg with your "don't hotlink" image url | |
| RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment