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

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 17 23:23:50 UTC 2010


#11995: 2.9.1 rc1 url rewrite rules constantly trying to re-add the rules (iis7)
--------------------------+-------------------------------------------------
 Reporter:  wpmuguru      |       Owner:                
     Type:  defect (bug)  |      Status:  new           
 Priority:  normal        |   Milestone:  Unassigned    
Component:  Multisite     |     Version:                
 Severity:  normal        |    Keywords:  needs-feedback
--------------------------+-------------------------------------------------
Changes (by wpmuguru):

  * keywords:  => needs-feedback


Comment:

 Code from the MU ticket:

 {{{
 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;
 }
 }}}

 Frumph,
 Can you add this before the if and let me know what it dumps out:

 {{{
 var_dump($web_config_file, file_exists($web_config_file));
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11995#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list