Wrong RewriteRule in a local Multisite installation
|Reported by:||Guy_fr||Owned by:||markjaquith|
|Severity:||normal||Keywords:||has-patch needs-testing needs-unit-tests|
- WampServer on Windows 8
- Install Wordpress in a subdirectory of the document root(here a directory "multitest")
- Setup multisite in subfolder mode.
Rules displayed for .htaccess in the wordpress textarea of the network page are:
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) c:\wamp\www\multitest/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ c:\wamp\www\multitest/$2 [L]
Result in the browser window of a subsite admin board is an error:
Forbidden You don't have permission to access /multitest/C:wampwwwmultitest/wp-admin/ on this server.
For the subsite itself, at least paths for css are broken.
RewriteRules should be:
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) /multitest/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ /multitest/$2 [L]
Looking at code source in network.php, I fixed it for my personal use by adding: $rewrite_base = $base; before the htaccess code is displayed to users.
This could be done with local multisite installation only.
Change History (57)
- Keywords dev-feedback added
- Severity changed from major to normal
comment:40 follow-up: ↓ 43 guy_fr — 11 months ago
comment:44 markjaquith — 11 months ago
- Owner set to markjaquith
- Resolution set to fixed
- Status changed from new to closed