[wp-trac] [WordPress Trac] #22639: Multisite in a subdirectory suggests the wrong location for .htaccess

WordPress Trac noreply at wordpress.org
Mon Dec 3 00:10:26 UTC 2012


#22639: Multisite in a subdirectory suggests the wrong location for .htaccess
--------------------------+--------------------
 Reporter:  nacin         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Multisite     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by dd32):

 Using `preg_replace()` seems like the safest option to me, anything else
 introduces the potential for multiple paths like evan pointed out causing
 issues.

 A note however, always remember to use the 2nd param to `preg_quote`, even
 if the delimiter has no chance of matching it..
 {{{
 preg_replace( '#' . preg_quote( $wp_dir_from_root, '#' ) . '$#', '',
 ABSPATH )
 }}}

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


More information about the wp-trac mailing list