Created
July 31, 2015 15:14
-
-
Save dscamahorn/839b4b3daae0f216ac3d to your computer and use it in GitHub Desktop.
Configure REP directives via X-Robots-Tags. Apache with Headers Module - .htaccess file or httpd.conf
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
<IfModule mod_headers.c> | |
# REP directives for all files | |
<Files ~ ".*"> | |
Header set X-Robots-Tag "noarchive, noodp" | |
</Files> | |
#REP directives for specific files | |
<Files ~ "\.(png|jpe?g|gif|mp4|ogv|webm|flv|fla|js|xml|json|txt|css)$"> | |
Header set X-Robots-Tag "noindex" | |
</Files> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment