[wp-trac] [WordPress Trac] #10719: Wordpress MU redirection on path-based install

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 2 06:17:02 UTC 2009


#10719: Wordpress MU redirection on path-based install
--------------------------+-------------------------------------------------
 Reporter:  antialias     |       Owner:  markjaquith  
     Type:  defect (bug)  |      Status:  new          
 Priority:  normal        |   Milestone:  Unassigned   
Component:  Canonical     |     Version:  2.8.4        
 Severity:  normal        |    Keywords:  needs-testing
--------------------------+-------------------------------------------------
 example:

 I have a fresh WPMU instance set up to work with paths. Base install
 location is set to

 http://example.com/

 I have a blog set up on http://example.com/site/ and a post that is
 accessible at

 http://example.com/site/blog/2009/09/01/hello-world/

 If I add a www. into this path, like this:

 http://www.example.com/site/blog/2009/09/01/hello-world/

 WPMU will redirect to

 http://example.com/site/

 Expected behavior is to redirect to

 http://example.com/site/blog/2009/09/01/hello-world/


 The fix is a one-liner: line 167 in wpmu-settings:

 {{{ header( "Location: http://" . $current_site->domain .
 $current_site->path ); }}}

 change to:

 {{{ header( "Location: http://" . $current_site->domain .
 $_SERVER['REQUEST_URI'] ); }}}

 The patch is attached.

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


More information about the wp-trac mailing list