Forked from chadclark/Robots Environment .htaccess
Last active
June 30, 2017 22:08
-
-
Save nigelheap/4ae418efa9f6d16dee3cd76fd15ec438 to your computer and use it in GitHub Desktop.
Robots.txt for Staging and Production. By adding these rewrite rules to your .htaccess file, robots_dev.txt will be served as robots.txt on any non-production server.
This file contains 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 | |
RewriteCond %{HTTP_HOST} \.dev$ [NC] | |
RewriteCond %{HTTP_HOST} ^dev\. [NC] | |
RewriteCond %{HTTP_HOST} \.uat$ [NC] | |
RewriteCond %{HTTP_HOST} ^uat\. [NC] | |
RewriteRule ^robots.txt robots_dev.txt [L] |
This file contains 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
User-agent: * | |
Allow: / |
This file contains 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
User-agent: * | |
Disallow: / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment