Skip to content

Instantly share code, notes, and snippets.

@BeFiveINFO
Last active March 24, 2017 22:05
Show Gist options
  • Save BeFiveINFO/b5445092dca18995fd25a61915d6244a to your computer and use it in GitHub Desktop.
Save BeFiveINFO/b5445092dca18995fd25a61915d6244a to your computer and use it in GitHub Desktop.
WordPress .htaccess Example for Hotlinking Protection
# Hotlink Protection
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yourdomain\.com/ [NC]
RewriteRule .*\.(jpe?g|gif|ogv|webm|bmp|png|mp4|svg|css|)$ http://your.domain.com/protected-image-banner.jpg [NC,R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment