WordPress.org

Make WordPress Core

Opened 7 years ago

Last modified 4 years ago

#18079 closed feature request

WP has dropped support of the path field in the site table — at Initial Version

Reported by: brianlayman Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Rewrite Rules Keywords: has-patch
Focuses: multisite Cc:

Description

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.

Change History (1)

Note: See TracTickets for help on using tickets.