Support » Networking WordPress » Issues with MU:Subdirectories (admin redirect loop)

  • Resolved vaccal


    Fresh install of WordPress 3.5 and MultiSite.

    The install is located directly in the ‘web’ folder, AKA the root.

    Chose subdirectories during the install, added the following lines of code to .htaccess and wp-config respectively.

    RewriteEngine On
    RewriteBase /
    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).*) wp/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]
    RewriteRule . index.php [L]
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    Using these settings allows me to access the main site and it’s wp-admin. It allows me to access the subdirectory (which appears without styling mind you) but when I try to access the wp-admin for subdir, I get the admin redirect loop.

    I double checked, and I’m pretty sure mod_rewrite is enabled (I tryed a simple redirect rule in the .htaccess)

    For reference,

    Thanks for any help on the subject, first time using MU.

Viewing 1 replies (of 1 total)
  • I have fixed my own problem, wanted to share it here incase others are having the same issue.


    1. In the WP-CONFIG code I linked earlier, DOMAIN_CURRENT_SITE was set to ‘localhost’, this was erroneous, I was messing around with stuff and forgot to change it back. It should have read
    2. I used the code that the WordPress codex supplies, but I think this might be wrong for people using MultiSite in the root directory of their site.


    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) wp/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]


    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) /$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ /$2 [L]

    i.e removing wp from in front of /$2

    Has seem to have solved my problems. It was driving me insane, I didn’t notice the extra characters in front. Marking as resolved, PM me if anyone needs help with this, think I have a good grasp now.

Viewing 1 replies (of 1 total)
  • The topic ‘Issues with MU:Subdirectories (admin redirect loop)’ is closed to new replies.