[wp-trac] [WordPress Trac] #23218: The suggested .htaccess rules located in `wp-admin/network/setup.php` do not work.

WordPress Trac noreply at wordpress.org
Sun Dec 31 18:42:47 UTC 2023


#23218: The suggested .htaccess rules located in `wp-admin/network/setup.php` do
not work.
--------------------------+------------------------
 Reporter:  conner_bw     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Multisite     |     Version:  3.5
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:
--------------------------+------------------------

Comment (by ahmedsayeed1982):

 The code is better below without pharagraphs;

 RewriteEngine On
 RewriteBase /~dac514/pb-externals/trunk/wp/
 RewriteRule ^index\.php$ - [L]

 # uploaded files
 RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) 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).*) $1 [L]
 RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
 RewriteRule . index.php [L]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/23218#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list