• Resolved seldarkroom

    (@seldarkroom)


    I hope someone can help me. I’ve been using similar forum posts to get to this point but am stuck ??

    So I’ve installed WP multisite in the root folder of the main site as instructed and after lots of troubleshooting using other forum links (thanks guys), I finally got the network admin working.

    The main site works perfectly well and the admin area works well, however the first subdomain site I created, although it shows up at the subdomain address (ie kiorapsychotherapy.lifeaftertrauma.com.au) any links to pages/posts etc redirect to the main domain rather than the subdomain address. I’ve installed domain mapping but don’t seem to be able to get it to work either at this point and I think everything is in the correct place as per instruction :/

    In the end I want the site to redirect to its actual web address (ie kiorapsychotherapy.com.au) … currently if I go to this url I get the following: https://lifeaftertrauma.com.au/wp-signup.php?new=www.kiorapsychotherapy.com.au
    so it’s finding a ‘non-existant’ site. I understand that if I change subdomain install to false then it goes directly to the main domain and also if I amend the wp-config file to include a NOBLOGREDIRECT then I get the same result. Should I be looking at the DNS entries? I have a wildcard DNS set up … i also have subdomain DNS entries … is this correct?

    I don’t want to make any more updates to the theme until I have this sorted so please excuse the WIP.

    Here is my current relevant code from the wp-config

    define('WP_DEBUG', false);
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'lifeaftertrauma.com.au');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    And from the htaccess

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    </IfModule>

    I’m sure someone can see quite quickly what I’ve done wrong … I’m hoping ?? And I hope that I explained that clearly. This is my first multisite and am rather confused :/

    Thanks so much.

Viewing 15 replies - 1 through 15 (of 28 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Thread Starter seldarkroom

    (@seldarkroom)

    Hi thanks for your reply.

    Yes, that’s the domain mapping plugin I installed? And I can’t seem to get it to work and I’ve been following the tutorial but my admin area does look very different to the tutorial admin).

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    my admin area does look very different to the tutorial admin).

    It shouldn’t. That admin area hasn’t changed.

    Go to /wp-admin/network/settings.php?page=dm_admin_page

    Do you have the IP of your main domain in there, and what domain options did you check?

    Thread Starter seldarkroom

    (@seldarkroom)

    Hi Mika,
    I have the main domain IP in there and the options I’ve checked are these two:
    Permanent redirect (better for your blogger’s pagerank)
    User domain mapping page

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    however the first subdomain site I created, although it shows up at the subdomain address (ie kiorapsychotherapy.lifeaftertrauma.com.au) any links to pages/posts etc redirect to the main domain rather than the subdomain address. I’ve installed domain mapping but don’t seem to be able to get it to work either at this point and I think everything is in the correct place as per instruction :/

    Okay, so you understand, permanent redirect means that mappeddomain.com will be used ??

    On /wp-admin/network/settings.php?page=dm_domains_admin if you have primary set for the domain, it’ll override your main page and the subdomain won’t show *except in old links.

    Thread Starter seldarkroom

    (@seldarkroom)

    Hi Mika,
    Thanks for the response.

    Okay, so you understand, permanent redirect means that mappeddomain.com will be used ??

    (putting on dunce cap) so that’s incorrect?? :/

    On /wp-admin/network/settings.php?page=dm_domains_admin if you have primary set for the domain, it’ll override your main page and the subdomain won’t show *except in old links.

    Ok so I know what you mean NOW, but prior to understanding what you meant I went and messed things up. I’m not sure what I was thinking at the time but when I couldn’t add a site ID for 1 (as it already existed but wasn’t visible in the domain mapping area) so I added that domain as 3 and made it the primary domain which created up some sort of loop as what was already 1 was now also 3 … so I created a duplicate without realising it and ended up with this error message:

    The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.

    So after a slow process and a few new error messages and multiple blog readings looking for solutions I removed the plugin altogether and updated the wp-config.php file to remove the sunrise line and got back to the working multisite.

    Then, I tried to reinstall the domain mapping plugin with a freshly downloaded version but am getting the same error as above ??

    I at least now understand what I should be doing with domain mapping but now have this new issue before I can get back there. Any ideas on how I can fix this? Or will I need to start all over again with a completely new WP install?

    Sorry for such a mess and I hope it makes some kind of sense.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Then, I tried to reinstall the domain mapping plugin with a freshly downloaded version but am getting the same error as above ??

    Which is the ‘error’? (It is kinda a mess and I want to make sure what YOU think is an error is what I do too ?? )

    If it helps, you can spell it out like this:

    I want to see: https://mapped.com with internal links to https://mapped.com

    I actually see: https://subdomain.mapped.com with internal links to https://mapped.com

    Thread Starter seldarkroom

    (@seldarkroom)

    Hey Mika,

    Hee yes it is a mess! sorry about that but I don’t want to give up as I want to learn the correct way to make this happen.

    This is the error I get when I reinstall the plugin – I’ve uninstalled it at the moment so there is no mapping in place ??

    The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.

    And … I was thinking about it and realised that there could be another obvious error in that I didn’t delete the preexisting subdomain setup. Should there only be a wildcard subdomain set up with no others?

    But back to your actual question and putting it the way you have (which is very clear ?? ) what I ultimately want is to see https://mapped.com with internal links to https://mapped.com and what I was getting at first was https://subdomain.mapped.com with internal links to https://mapped.com but then was getting internal links to https://subdomain.mapped.com … is that a bit clearer?

    Unfortunately due to my looping incident I now only get the error message (block quoted above) when I install the domain mapping plugin … I was wondering if there is any code that would be hidden elsewhere that I should remove other than in the wp-config.php file before I reinstall clean?

    Thanks.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Just to clarify something, you’re not mapping mapped.com to subdomain.mapped.com — That was my bad! It’s mapped.com to subdomain.unmapped.com ??

    I was wondering if there is any code that would be hidden elsewhere that I should remove other than in the wp-config.php file before I reinstall clean?

    The database: https://wpmututorials.com/how-to/how-to-disable-multisite/

    The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.

    That just means that unmapped.com has to be unmapped.com, and not unmapped.com/folder/

    Thread Starter seldarkroom

    (@seldarkroom)

    Thanks Mika,

    So I’ve completed disabled multisite (thanks for the link). And before I try again to get the multisite installed from scratch can I just clarify that I should only have a wildcard subdomain set up – and no others (ie there should only be *.mydomain.com.au … and not subdomain.mydomain.com.au as well).

    I fear as there was a subdomain.mydomain.com.au previously set up that this was creating the weird loop issue previously but I could be wrong.

    thanks

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    And before I try again to get the multisite installed from scratch can I just clarify that I should only have a wildcard subdomain set up – and no others (ie there should only be *.mydomain.com.au … and not subdomain.mydomain.com.au as well).

    Correct.

    Thread Starter seldarkroom

    (@seldarkroom)

    Hi Mika,

    Finally, I’m back again and started from scratch today – methodically and slowly – and everything was going well until I Network Activated the MU Domain Mapping plugin, moved the sunrise.php file to the correct folder (ie the wp-content folder), and then added the correct “define sunrise on” definition in the wp-config.php file and then couldn’t go any further as I no longer had permission to access my network admin and get the following message: ‘You do not have sufficient permissions to access this page.’ And the sites are no longer accessible. As soon as I remove the line everything is back and functioning.

    So I can’t even get in to where I previously had issues? How odd. Any ideas on this one?

    Thanks

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Moved the file or copied the sunrise file?

    Thread Starter seldarkroom

    (@seldarkroom)

    Moved the file.

    Should it be copied?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Generally yes ?? An upgrade would just restore it anyway.

    What are your server specs? PHP etc?

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘Subdomain redirecting to main domain’ is closed to new replies.