Skip to content

Instantly share code, notes, and snippets.

@allybee
Last active January 4, 2016 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allybee/ba035ab2e6e06989805e to your computer and use it in GitHub Desktop.
Save allybee/ba035ab2e6e06989805e to your computer and use it in GitHub Desktop.
Disallow robots on Staging server
User-agent: *
Disallow: /
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
# On Staging, serve robots-staging.txt instead of robots.txt
RewriteCond %{HTTP_HOST} staging.spydertrapdev\.com [NC]
RewriteRule ^robots\.txt /robots-staging\.txt [NC,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment