Skip to content

Instantly share code, notes, and snippets.

@sskylar
Last active December 13, 2015 20:48
Show Gist options
  • Save sskylar/4972830 to your computer and use it in GitHub Desktop.
Save sskylar/4972830 to your computer and use it in GitHub Desktop.
Protect SS files from hotlinking
RewriteCond "%{HTTP_HOST}_%{HTTP_REFERER}" "!\.?([^\.]+\.[^\.]+?)_https?://.*\1/.*$" [OR]
RewriteCond %{HTTP_REFERER} ^$
RewriteRule ss-[a-zA-Z0-9-]+\.(woff|eot|ttf|svg|js|css)$ - [F,NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment