Multisite subdirectory infinite redirect loop

Hi, my multisite with subdirectory setup is working fine before I updated to WP 4.3 for subsites without mapped domain (e.g. http://hostjoints.com/b2bshop/). But now it goes on infinite redirect loop whenever I access the dashboard (e.g. http://hostjoints.com/b2bshop/wp-admin ).

Below is the error message:

This webpage has a redirect loop

ERR_TOO_MANY_REDIRECTS

Note: NO issues when accessing wp-admin on sites with mapped domains.

Regards,
Bloggista

  • Adam Czajczyk

    Hey Bloggista,

    I hope you're well today and thank you for your question!

    I've tried to take a look at your site but it's not letting me in because it thinks I'm a "spammer" and it doesn't let me go through "explanation/captcha" form.

    That being said, despite the issue are you able to disable that security mechanism for a while and also could you please grant me a support access to your site so I could take a closer look at your setup?

    To grant an access, please follow this guide:
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Cheers,
    Adam

  • Predrag Dubajic

    Hi Bloggista,

    Apologies for the delay here.

    Can you check your site .htaccess file and make sure that there aren't any rules that could be causing this.

    Also I noticed that this is only happening when trying to go to domain.com/sub-site/wp-admin/

    But if you try to go to domain.com/sub-site/wp-admin/index.php for example you should be able to see your dashboard and navigate thought it.

    So I believe issue here is .htaccess rule or security plugin that you have installed.

    If you are not sure can you paste here content of your .htaccess file?

    Best regards,
    Predrag

  • Bloggista

    Hi Predrag,

    First, thanks for pointing out the Dashboard can be accessed by going to domain.com/sub-site/wp-admin/index.php

    Here's the content of my .htaccess

    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]
    RewriteRule . index.php [L]

    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    deny from 23.251.151.31
    deny from 69.12.70.112
    deny from 223.223.151.253
    deny from 183.223.11.16
    deny from 92.45.179.67
    deny from 212.74.13.66
    deny from 107.182.120.40
    deny from 80.91.178.237
    deny from 198.23.234.229
    deny from 23.232.143.83
    deny from 192.230.52.27
    deny from 23.95.93.249
    deny from 98.143.159.19
    deny from 41.206.12.39
    deny from 110.173.49.18
    deny from 63.223.78.10
    deny from 192.200.24.110
    deny from 107.153.7.227
    deny from 23.95.21.237
    deny from 188.138.9.49
    deny from 167.160.110.181
    deny from 93.118.67.64
    deny from 23.108.100.248
    deny from 89.44.24.1
    deny from 107.153.7.232
    deny from 197.229.144.148
    deny from 198.175.127.46
    deny from 192.95.43.161
    deny from 107.153.64.178
    deny from 37.203.211.168
    deny from 63.223.78.45
    deny from 63.223.78.1/32
    deny from 63.223.78.2/31
    deny from 63.223.78.4/30
    deny from 63.223.78.8/29
    deny from 63.223.78.16/28
    deny from 63.223.78.32/27
    deny from 63.223.78.64/27
    deny from 63.223.78.96/30
    deny from 199.168.151.162
    deny from 88.150.168.1/32
    deny from 88.150.168.2/31
    deny from 88.150.168.4/30
    deny from 88.150.168.8/29
    deny from 88.150.168.16/28
    deny from 88.150.168.32/27
    deny from 88.150.168.64/26
    deny from 88.150.168.128/26
    deny from 88.150.168.192/29
    deny from 23.19.46.1/32
    deny from 23.19.46.2/31
    deny from 23.19.46.4/30
    deny from 23.19.46.8/29
    deny from 23.19.46.16/28
    deny from 23.19.46.32/27
    deny from 23.19.46.64/26
    deny from 23.19.46.128/26
    deny from 23.19.46.192/29
    deny from 155.94.221.1/32
    deny from 155.94.221.2/31
    deny from 155.94.221.4/30
    deny from 155.94.221.8/29
    deny from 155.94.221.16/28
    deny from 155.94.221.32/27
    deny from 155.94.221.64/26
    deny from 155.94.221.128/25
    deny from 209.161.102.1/32
    deny from 209.161.102.2/31
    deny from 209.161.102.4/30
    deny from 209.161.102.8/29
    deny from 209.161.102.16/28
    deny from 209.161.102.32/27
    deny from 209.161.102.64/26
    deny from 209.161.102.128/25
    deny from 209.161.98.172
    deny from 165.231.8.11

    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
    <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
    # END W3TC Browser Cache

    <Files "xmlrpc.php">
    Deny from all
    ErrorDocument 403 "Denied by ServInt"
    </Files>

  • Predrag Dubajic

    Hi Bloggista,

    Can you temporarily revert to original .htaccess rules and see if wp-admin url will be working after that.

    Also, make sure that security plugins are disabled so we can try pinpointing the cause of this.

    You can use these default rules:

    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]
    RewriteRule . index.php [L]

    Let us know of the results.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.