Created
June 6, 2011 22:12
-
-
Save jorgepedret/1011229 to your computer and use it in GitHub Desktop.
Htaccess 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