Serve robots.txt as text/plain. Props JeremyVisser. fixes #4037

git-svn-id: https://develop.svn.wordpress.org/trunk@5117 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-03-27 16:44:36 +00:00
parent 9de70f4145
commit 0ba70bb459
1 changed files with 3 additions and 0 deletions

View File

@ -982,7 +982,10 @@ function do_feed_atom($for_comments) {
}
function do_robots() {
header('Content-type: text/plain; charset=utf-8');
do_action('do_robotstxt');
if ( '0' == get_option('blog_public') ) {
echo "User-agent: *\n";
echo "Disallow: /\n";