[wpmu-trac] [WordPress MU Trac] #1187: 2.9.1 rc1 url rewrite rules constantly trying to re-add the rules (iis7)

WordPress MU Trac wpmu-trac at lists.automattic.com
Wed Jan 6 10:54:02 UTC 2010


#1187: 2.9.1 rc1 url rewrite rules constantly trying to re-add the rules (iis7)
----------------------------+-----------------------------------------------
 Reporter:  Frumph          |        Owner:  somebody
     Type:  defect          |       Status:  reopened
 Priority:  high            |    Milestone:          
Component:  Administration  |      Version:          
 Severity:  major           |   Resolution:          
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by Frumph):

 I traced it to being a problem here: in wp-admin/includes/misc.php

 {{{
 function iis7_save_url_rewrite_rules(){
         global $wp_rewrite;

         $home_path = get_home_path();
         $web_config_file = $home_path . 'web.config';

         // Using win_is_writable() instead of is_writable() because of a
 bug in Windows PHP
         if ( ( ! file_exists($web_config_file) &&
 win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks()
 ) || win_is_writable($web_config_file) ) {
                 if ( iis7_supports_permalinks() ) {
                         $rule = $wp_rewrite->iis7_url_rewrite_rules(false,
 '', '');
                         var_dump($rule);
 //                      if ( ! empty($rule) ) {
 //                              return
 iis7_add_rewrite_rule($web_config_file, $rule);
 //                      } else {
 //                              return
 iis7_delete_rewrite_rule($web_config_file);
 //                      }
                 }
         }
         return false;
 }
 }}}

 If I comment the if (!empty$rule)) section it seems to work fine for
 creating and not keep retrying to input the rules over and over

 the var_dump($rule) I put in there is returning this:
 {{{
 string(2248) "                                          "
 }}}

 Which seems a little odd.

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/1187#comment:3>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list