Multisite WordPress + Domain mapping + WP-Login rename issue

WPS Hide Login
WordPress MU Domain Mapping

When I changed my login string to something like secretlogin and a subsite has a subdomain, aaa.bbb.ccc.org for example, going to aaa.bbb.ccc.org/secretlogin gets redirected to a non-existent URL, http://aaa.bbb.ccc.org/-/-/-/-/-/-/-/-/-/-/. If I log into http://my.realdomain.org/secretlogin/, I can then go to http://aaa.bbb.ccc.org/secretlogin or http://aaa.bbb.ccc.org/wp-admin/ and get redirected to the subsite's dashboard.

Any idea how to fix this issue?

Thank you.

  • Kasia Swiderska

    Hello knluu,

    Are you using our Domain Mapping plugin https://premium.wpmudev.org/project/domain-mapping/ or different one?
    Does aaa.bbb.ccc.org is mapped or orginal domain? I want to be sure if we are on the same page here. Your network is installed on bbb.ccc.org?

    The issue you are seeing with all ////// in url usually means too many redirects on some - in most cases it is caused by wrong redirects rules in htaccess. Can you show me your htaccess file?

    kind regards,
    Kasia

  • knluu

    Hi Kasia,

    I'm using

    WordPress MU Domain Mapping
    Version 0.5.4 | By Donncha O Caoimh

    aaa.bbb.ccc.org maps to a subsite at bbb.ccc.org/aaabbb and is set as the primary domain using the mapping plugin.

    # BEGIN WordPress
    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]
    RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    <files xmlrpc*="">
    order deny,allow
    deny from all
    </files>

    Order deny,allow
    Deny from all
    <Files ~ ".(jpe?g|png|gif|mp3|wav|ogg|m4a|mp4|mov|wmv|avi|mpg|ogv|3gp|3g2|pdf|docx?|pptx?|ppsx?|odt|xlsx?|zip)$">
    Allow from all
    </Files>

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^wp-admin/includes/ - [F,L]
    RewriteRule !^wp-includes/ - [S=3]
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
    RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
    RewriteRule ^wp-includes/theme-compat/ - [F,L]
    </IfModule>

    # Block dot directories such as Git and SVN
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
    RewriteCond %{SCRIPT_FILENAME} -d [OR]
    RewriteCond %{SCRIPT_FILENAME} -f
    RewriteRule "(^|/)\." - [F]
    </IfModule>

    # Block backup, swap, and log files
    <FilesMatch "(^#.*#|\.(bak|conf|dist|fla|in[ci]|log|psd|save|sh|sql|sw[op])|~)$">

    # Apache < 2.3
    <IfModule !mod_authz_core.c>
    Order allow,deny
    Deny from all
    Satisfy All
    </IfModule>

    # Apache >= 2.3
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>

    </FilesMatch>

    Options -Indexes
    # WordPress SEO - XML Sitemap Rewrite Fix
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^sitemap_index\.xml$ /index.php?sitemap=1 [L]
    RewriteRule ^([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
    </IfModule>
    # END WordPress SEO - XML Sitemap Rewrite Fix

    # END WordPress

  • Rupok

    Hi knluu

    Hope you had a wonderful day.

    Seems like you are using this plugin:
    https://wordpress.org/plugins/wordpress-mu-domain-mapping/

    Unfortunately this is not from WPMU DEV. It's a third party plugin and I'm afraid, I've no idea on their coding architecture. So I can't actually find the reason why this plugin is causing this.

    You can always ask the plugin developer regarding this. But if you don't find it comfortable using that plugin, you can use ours one. We have a plugin for same purpose - "Domain Mapping". You can map domains to your subdomains with this plugin too. And if you use this, then we can troubleshoot any problem regarding this because we have full expertise and idea about the coding architecture of our plugin.

    Is there anything else we can help you with? We will be glad to help.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.