[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:26:43 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 following rules should be added to the setup.php file in place of the
recommended.htaccess 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]
Your localhost environment should function better with these updated
rules. Make sure to add the updated rules above to the.htaccess file in
your WordPress installation, replacing the ones that are currently there.
Try adding a new site again after making these adjustments to see if the
infinite redirect error has been fixed. If the problems persist, you might
also need to make sure that your local server environment is configured
correctly for multisite installations and examine the WordPress
configuration. Furthermore, if mod_rewrite isn't already enabled in your
Apache configuration, make sure it is.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23218#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list