[wp-trac] [WordPress Trac] #18079: WP has dropped support of the path field in the site table

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 12 05:06:31 UTC 2011


#18079: WP has dropped support of the path field in the site table
--------------------------+-----------------------------
 Reporter:  brianlayman   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Multisite     |    Version:  3.2
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 I've had inquiries about sites that used to work in WordPress Mu that no
 longer work in WordPress 3.1.

 The idea is to have a path based network for each state/province and sites
 for each city under that, all networks hosted under the same domain.

 Like so
 Network 1:
 Network domain: example.com Network path: /ohio/
     site domain: example.com path: /ohio/akron
     site domain: example.com path: /ohio/canton
     site domain: example.com path: /ohio/uniontown

 Network 2:
 Network domain: example.com Network path: /pa/
     site domain: example.com path: /pa/pittsburgh
     site domain: example.com path: /pa/greensburg
     site domain: example.com path: /pa/erie

 Network 3:
 Network domain: example.com Network path: /indiana/
     site domain: example.com path: /indiana/indianapolis

 There are two things that are preventing this. First, in new_site, instead
 of including the path from the sites table for the current network, it
 uses the global $base variable which is always / in this scenario. Using
 $current_site->path resolves that.

 The second issue is that the .htaccess code is too restrictive. It will
 the paths on two levels. /network/site/wp-admin/ doesn't work but /site
 /wp-admin/ does.

 Adjusting lines similar to
 RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1
 over to
 RewriteRule  ^[_0-9a-zA-Z/-]+/(wp-(content|admin|includes).*) $1

 resolves that.

 The attached patch addresses both of these requirements.

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


More information about the wp-trac mailing list