Skip to content

Instantly share code, notes, and snippets.

@martijngastkemper
Created December 9, 2014 10:24
Show Gist options
  • Save martijngastkemper/8673e1c5dfcb7981b39d to your computer and use it in GitHub Desktop.
Save martijngastkemper/8673e1c5dfcb7981b39d to your computer and use it in GitHub Desktop.
Some htaccess rules to block all traffic or traffic from a specific domain.
RewriteCond %{HTTP_REFERER} facebook.com [NC] # Optional: block only traffic from facebook.com
RewriteRule .* - [R=404] # Give all visitors a 404 response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment