[wp-trac] [WordPress Trac] #23073: Wrong RewriteRule in a local Multisite installation
WordPress Trac
noreply at wordpress.org
Sat Jan 5 16:16:24 UTC 2013
#23073: Wrong RewriteRule in a local Multisite installation
------------------------------------------------------+--------------------
Reporter: Guy_fr | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5.1
Component: Multisite | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-unit-tests |
------------------------------------------------------+--------------------
Comment (by Rarst):
Test with 23073.7.2.diff
- Windows
- Apache
- locally mapped `dev.rarst.net` domain
- subdir multisite
- core in `/wordpress`
Data:
{{{
ABSPATH => C:\server\www\dev\wordpress/
$_SERVER['SCRIPT_FILENAME'] => C:/server/www/dev/wordpress/wp-
admin/network/setup.php
$_SERVER['DOCUMENT_ROOT'] => C:/server/www/dev/
get_home_path() => C:\server\www\dev\wordpress/
get_option('siteurl') => http://dev.rarst.net
get_option('home') => http://dev.rarst.net
hostname => dev.rarst.net
slashed_home => http://dev.rarst.net/
base => /
document_root_fix => C:/server/www/dev
abspath_fix => C:/server/www/dev/wordpress/
home_path => C:/server/www/dev/
wp_siteurl_subdir => wordpress/
rewrite_base => wordpress/
}}}
Generated `.htaccess`:
{{{
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wordpress/wp-includes/ms-
files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)
wordpress/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wordpress/$2 [L]
RewriteRule . index.php [L]
}}}
Result:
- `.htaccess` rules work
- `.htaccess` location is detected correctly
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23073#comment:41>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list