[wp-trac] [WordPress Trac] #23073: Wrong RewriteRule in a local Multisite installation

WordPress Trac noreply at wordpress.org
Thu Jan 3 21:29:07 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:  dev-feedback reporter-feedback  |
--------------------------------------------+--------------------

Comment (by Rarst):

 Hit same issue. This is not caused by symlink in my case, but by where
 data is taken from - causing separator mismatch that makes
 `$wp_dir_from_root  = preg_replace( '#^' . preg_quote(
 $_SERVER['DOCUMENT_ROOT'], '#' ) . '#', '', ABSPATH );` replacement
 produce incorrect result (absolute path).

  - `ABSPATH` is defined as `dirname(__FILE__)` which is generated by PHP
  - `$_SERVER['DOCUMENT_ROOT']` seems to be taken verbatim from Apache
 configuration

 Naturally there is no guarantee that the two use the same separator
 convention. Can't even rely on OS to determine which one Apache config
 uses since it can be typed in freeform.

 So either data needs to come from compatible sources or separators need to
 be force equalized before running replacement.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23073#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list