#23218 closed defect (bug) (duplicate)
The suggested .htaccess rules located in `wp-admin/network/setup.php` do not work.
Reported by: | conner_bw | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5 |
Component: | Multisite | Keywords: | |
Focuses: | Cc: |
Description
Hi
I've installed WordPress 3.5 as multi-site on my localhost mahcine. I used the "Famous 5-Minute Install." + "Create a Network of WordPress Sites" docs. Once finished, the root blog is working fine, all the admin options are working fine.
The site URL is located here:
### http://localhost/~dac514/pb-externals/trunk/wp/
The issue is when I add a new site named "test" I get an infinite redirect error I.e
### This web page has a redirect loop. The web page at http://localhost/~dac514/pb-externals/trunk/wp/test/wp-admin/ has resulted in too many redirects.
The problem is the suggested .htaccess rules are wrong.
When I go to:
### http://localhost/~dac514/pb-externals/trunk/wp/wp-admin/network/setup.php
I'm suggested:
RewriteEngine On RewriteBase /~dac514/pb-externals/trunk/wp/ RewriteRule ^index\.php$ - [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).*) home/dac514/public_html/pb-externals/trunk/wp/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ home/dac514/public_html/pb-externals/trunk/wp/$2 [L] RewriteRule . index.php [L]
These rules do not work. In contrast, replacing them with an old rule set suggested by 3.4.X works fine. I.e.
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]
Help?
Change History (2)
#1
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
#2
@
9 hours ago
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.
Duplicate of #23073.