• Resolved badwoods

    (@badwoods)


    hello,

    this is my first post on wordpress forums, but i’ve been working with wordpress quite a bit without any major issue.
    This time i ran into a big one and i really got to find a way to get out of it.
    I’ll explain you:

    I am working on a WordPress MU installed on top of a domain called (let’s say) mydomain.com realized. WPMU was installed using the subdomain mode.
    The main site is mydomain.com .
    Blog number 2 is site1.mydomain.com.
    I use Donncha’s WordPress MU Domain Mapping plugin to map blog number 2 to https://www.site1.com (primary) and https://www.site1.org .
    Everything is working fine at this point: if I type https://mydomain.com I see the main site, if I type https://www.site1.com i see the secondary blog. If I type https://www.site1.org I get redirected to https://www.site1.com, and that’s fine (and that is also how primary flag works I suppose).

    The problem came in when I was asked to create a third blog into the same WPMU installation, and let the blog respond to https://otherblog.site1.com .
    I did the same procedure and create a 3 blog, which resides at site2.mydomain.com, and mapped it to https://otherblog.site1.com through the plugin.
    DNS and VHOST settings are similar to those used for blog number 2.
    Now I am still able to view the first two blogs correctly, both the front-end and the admin panel.
    But if I (or any other user on any other browser/machine) type https://otherblog.site1.com into my browser I get redirected to https://otherblog.site1.com/wp-admin, always.
    I can correctly enter the admin panel of my brand new site, but it’s impossible form to surf the site. No frontend. I get always redirected to https://otherblog.site1.com/wp-admin.

    I double checked every setting, both in the webserver and in WP. I googled to find an answer but the most useful thing I could find was a sentence telling that the plugin I am using “is able to map third level domains”.
    But at the moment I am stuck and cannot map them.

    Thanks in advance for your help!
    Badwoods

Viewing 7 replies - 1 through 7 (of 7 total)
  • This may have something to do with the order of entries in your Virtual Hosts section for Apache.

    When you created the entries for otherblog.site1.com, did you put the below the entries for https://www.site1.com? If so, try moving otherblog.site1.com to the top.

    Thread Starter badwoods

    (@badwoods)

    Hi Tim,
    well I actually tried every order of ServerAlias entries without any luck.
    I also had a look to the plugin code and the funny thing is I cannot find any redirect to any_site/wp-admin.
    I really cannot find the point in here!

    Do you have separate <VirtualHost site1.com:80></VirtualHost> blocks for each URL? The order of those blocks is what I’m referring to. I don’t think ServerAlias would effect this issue at all.

    But if I (or any other user on any other browser/machine) type https://otherblog.site1.com into my browser I get redirected to https://otherblog.site1.com/wp-admin, always.

    Can you give us a link?

    Thread Starter badwoods

    (@badwoods)

    ok Andrea:
    the main site is
    https://toscana-notizie.it

    secondary site is
    https://www.giovanisi.it

    the problem is on the third site:
    https://blog.giovanisi.it

    @tim
    no I got a single VHOST entry mapping everything, I’ll try the way you told me and let you know.

    Thread Starter badwoods

    (@badwoods)

    Update:

    I tried separate VHOST definitions in any order, no way.

    I replicated the situation in a test environment and find out the same problem switched. I mean I got the first (main) blog – testdomain.com -, nice it’s working.
    Second blog – site1.testdomain.com mapped on https://www.site1.com -, working fine as well.
    Then I created the third blog – site2.testdomain.com mapped on otherblog.site1.com -, and I saw it working and said WOW!!!
    Then I typed https://www.site1.com and and got redirected to https://www.site1.com/wp-admin.

    So I followed the same identical procedure and got the problem on the second blog this time!!

    So I even tried to remove the third entry from the Apache configuration, but NOT from WordPress, just to give it a try.
    The problem still remains.
    It looks like is not an Apache configuration problem, looks more like a WordPress/plugin behaviour.

    I re-read the plugin code but found nothing again.
    I’ll have a deep look into the database to see if I can find out something useful.

    Thread Starter badwoods

    (@badwoods)

    ok guys, the time has come to say it and I’m gonna say it: shame on me!!!!!

    https://erikshosting.com/wordpress-tips-code/wp3-multi-site-sub-site-redirects-to-wp-admin/

    I had my third site (second in test env) setted in the ‘Dashboard Site’ option of ‘super-admin’->’options’.

    Actually I did that explicitly for a reason, because I need self registering user to be automatically enabled for the third site. I found out that with that option I got it as an automatic behaviour, but that cause the problem I ran into.

    I’d better start searching for ALL the SIMPLEST solutions next time.

    Thanks all for the support!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Multisite Domain Mapping thir level domains issue’ is closed to new replies.