Support » Networking WordPress » The ol' redirect loop. Can't access dashboard.

  • Resolved gpspake


    I’ve read about this for hours and tried everything I could find but I’m having no luck.

    I added a site to my multisite installation and I can’t get to the dashboard. I get a redirect loop.

    I understand this is an htaccess issue and I think I have a pretty good understanding of what is happening (Thanks to this guy) but I can’t manage to get it working.

    I should note that I am not having the same problem on an identical server with the exact same configuration and settings.

    My .conf file is as follows…

    # BEGIN WordPress
    <Directory /var/www/html>
    AllowOverride All
    <IfModule mod_rewrite.c>
            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).*) $2 [L]
    #RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule . index.php [L]
    # END WordPress

    Any suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ok, so I uncommented this line and it’s sort of working
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]

    But now I have an even stranger issue. If I’m in the dashboard for the site I just added and I hover over ‘my sites’ only network admin and the primary site show up. If I’m in the primary site dashboard or network admin and I hover over it, I see both sites listed. This really isn’t to much of an issue but I think it could be indicative of some larger issue.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Wow. A response from the master. I’m not worthy.
    Man what a headache.

    There are so many threads about this but it’s usually a multi-factor problem which makes it very difficult to provide any sort of definitive answer, but after about 30 minutes of going back and forth we realized that the working site had a second .conf file on the server that was added by the person who originally set it up. Now that we are enlightened to this fact it explains some separate issues we were having with that installation. whew.

    Anyway, once we realized that there was another conf file on the working-site server, we were able to see what was going on and modify the one that wasn’t working.

    So kids,
    There’s no end all solution for this. It depends on your specific configuration and installation. (Also make sure you don’t have a .conf file or .htaccess file that could be impacting something else. The version you were on when you installed multisite is also a factor.
    Always listen to Ipstenu, in the end, this codex page is the key.

    Here’s how it came out.

    <Directory /var/www/html/>
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    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]
    #This will be different for multisites installed from 3.5 or later
    #should use next 2 lines
    #RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) wp/$2 [L]
    #RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ wp/$2 [L]
    #Currently started @ 3.4 so we need next 2 lines
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    #this section pushes all stuff into wordpress rewrite.
    # need to find a way to remove select subdirectories so that other things can be installed
    #RewriteRule !^(special(/.*)?|collector\.html)$ collector.html [R,L]
    # END WordPress
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The ol' redirect loop. Can't access dashboard.’ is closed to new replies.