WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
Domain mapping redirects : Correct behaviour? (3 posts)

  1. c3iq
    Member
    Posted 3 years ago #

    Hello,
    I have created a WPMU site with DNS wildcard domains. I'm using LDAP and newly authenticated accounts have a new blog created. Unfortunately the username is not very pretty and the resulting URL http://abcde00.domain.com does not reflect the use of the blog. We're using Domain Mapping to remedy this.

    2 issues:

    The problem is that if we use the new domain as the Primary the web site gets stuck in a redirect loop.

    If we use the username domain as the Primary the well named URL redirects to the old/unwanted URL.

    Is this the correct behaviour?

    This is the URL Rewrite code:

    <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]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ /index.php/$1 [L,QSA]
    
    # 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]
    </IfModule>

    Thanks for any help.

    Owen.

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 3 years ago #

  3. c3iq
    Member
    Posted 3 years ago #

    It may be working.

    I took the suggested rewrite rules from the 'Network' section of
    Admin but, also, the user had a mixture of upper and lower case in their domain mapping. I deleted it and added it again all in lowercase. I made it the Primary and it started working.

    Hope this helps someone.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic