[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
Mon Mar 18 19:47:41 UTC 2024


#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 gokhanenginar):

 Replace the suggested .htaccess rules in the setup.php file with the
 following rules:

  {{{
  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]

  }}}


 These modified rules should work better for your localhost environment.
 Make sure to replace the existing .htaccess rules in your WordPress
 installation's .htaccess file with the updated rules above.

 After making these changes, try adding a new site again and see if the
 infinite redirect error is resolved. If you continue to experience issues,
 you may also need to check your WordPress configuration and ensure that
 your local server environment is properly set up for multisite
 installations. Additionally, ensure that mod_rewrite is enabled in your
 Apache configuration if it's not already enabled.

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


More information about the wp-trac mailing list