[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 16:48:21 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 suggested.htaccess rules should be replaced with the following rules
 in the setup.php file:

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

 # add a trailing slash to /wp-admin
 RewriteRule wp-admin$ wp-admin/ [R=301,L]

 RewriteCond %{REQUEST_FILENAME} -f [OR]
 RewriteCond %{REQUEST_FILENAME} -d
 RewriteRule - [L]
 RewriteRule ([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) wp/$2 [L]
 RewriteRule ([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]
 RewriteRule . index.php [L]

 With these revised rules, your localhost environment ought to perform
 better. Make sure you replace the existing rules in the.htaccess file in
 your WordPress installation with the updated ones mentioned above.
 After making these changes, try adding a new site once more to check if
 the infinite redirect error has been resolved. If the issues continue, you
 may also need to check the WordPress configuration and confirm that your
 local server environment is set up properly for multisite installations.
 Additionally, confirm that mod_rewrite is enabled in your Apache
 configuration if it isn't already.

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


More information about the wp-trac mailing list