[wp-trac] [WordPress Trac] #15647: robots.txt not correctly changing between allow and disallow

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 2 14:10:07 UTC 2010


#15647: robots.txt not correctly changing between allow and disallow
---------------------------+------------------------------------------------
 Reporter:  ipstenu        |       Owner:                 
     Type:  defect (bug)   |      Status:  new            
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Accessibility  |     Version:                 
 Severity:  major          |    Keywords:                 
---------------------------+------------------------------------------------
 From this thread: http://wordpress.org/support/topic/robotstxt-set-to-
 disallow-cant-change

 In wp-includes/functions.php file from the 1779 line starts do_robots
 function:

 {{{
 do_robots function () {
 header ('Content-Type: text / plain; charset = utf-8');

 do_action ('do_robotstxt');

 $ output ='';
 $ public = get_option ('blog_public');
 if ('0 '== $ public) {
 $ output .= "User-agent: * \ n ";
 $ output .= "Disallow: / \ n ";
 Else {}
 $ output .= "User-agent: * \ n ";
 $ output .= "Disallow: \ n ";
 }

 apply_filters echo ('robots_txt', $ output, $ public);
 }
 }}}

 That first if should be:
 {{{
 if ('0 '== $ public) {
 $ output .= "User-agent: * \ n ";
 $ output .= "Allow: / \ n ";
 }}}

 Prod '''ellp'''

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15647>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list