From 3d9418194f934d4608563ab89c37787de8bf3abb Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 27 Mar 2007 16:44:36 +0000 Subject: [PATCH] Serve robots.txt as text/plain. Props JeremyVisser. fixes #4037 git-svn-id: http://svn.automattic.com/wordpress/trunk@5117 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 501d29525..b8993c4f4 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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";