there everyone - I've got a strange one here. Has anyone

Hi there everyone -

I've got a strange one here. Has anyone seen an issue that suddenly appears with logging in with a multi-domain install? My users who have selected a domain option different than our "master" domain can no longer log in. They enter their credentials and are redirected to the log in screen. It's happening for the Super Admin accounts as well, the only way we are able to log into their sites is to go and edit the site and switch the domain. It's becoming a problem as over 300 of our sites are currently using a different domain and they are all contacting us for help, we're not sure what to do.. The strange thing is that I'm not aware of any changes we've made that would have caused this. We did create a custom login page, but have since disabled that thinking that it might help, but it doesn't seem to make a difference.

Any advice is very welcome, we're stumped here...

Thank you!

  • Alexander
    • DEV MAN’s Mascot

    Hi @skishopmatt,

    I'm not sure what would cause this, but I've noticed you're using an older version of Multi-Domains. Could you try upgrading to the latest version? Several improvements have been made. It will even update the sunrise.php automatically for you now.

    Hopefully the update will resolve your issues. Let me know how it goes.

    Best regards,

  • skishopmatt
    • Site Builder, Child of Zeus

    Hi Alexander -

    Thanks for getting back to me. I can try that again, but last time we updated the plugin it messed up all the custom and multi domains, so we reverted it back to a previous version (see this forum discussion) -

    I'll give it a try on the sandbox site again and see if we can get it working.

    On that note though, do you know of any easy way to change the domain of a site and not have to go through and update all the images?

    For example, if we are moving from sub.domain2.com to sub.domain1.com the images are still tied to sub.domain2.com and we're having to go through and manually adjust them. It's been quite time consuming... Any faster solutions would be very welcome :slight_smile:

  • Alexander
    • DEV MAN’s Mascot

    Hi @skishopmatt,

    We've had some major updates to both our domain mapping and multi domain plugins. In fact, Multi-Domains can now be installed like a standard plugin. It will also automatically update sunrise.php for you.

    So overall, with the new version we're going for a better experience and easily setup. I'm sorry to hear you had issues with the last update.

    There are a few methods to move your links. You'll pretty much need to to a search/replace on your database content. Here are a few articles with more info on this:

    http://interconnectit.com/products/search-and-replace-for-wordpress-databases/
    http://www.craniumstorm.com/how-to-move-a-wordpress-site/

    Best regards,

  • Patricia BT
    • Connector

    Hi,

    In fact I had an issue with latest of both plugins, and I found the reason why. Actually the sunrise.php moved (from domain mapping) the first time manually to wp-content/ has to be writable by the system in order for it to be updated by the multi domain

    You might want to read the solution (or the whole post to see if it's similar), here
    https://premium.wpmudev.org/forums/topic/cant-login-on-subsite-multi-domain-and-domain-mapping-together#post-559278
    (and 2 comments below I added a link to the modified file)

    Tell me if it helped and I wish you all the best
    Patricia

  • skishopmatt
    • Site Builder, Child of Zeus

    Hi Alexander and Patricia -

    Thanks so much for the advice and suggestions! I look forward to testing them out later this week. I'll keep you both posted on what I discover.

    I do have one more question that's related as well. We are slowly moving all of our secondary domain customers over to our primary domain and we are using a simple htaccess condition to point their old domain to the new one. They look like this:

    RewriteCond %{HTTP_HOST} ^subdomain.domain2.com$
    RewriteRule ^/?$ "http\:\/\/subdomain.domain1\.com" [R=301,L]

    It's working great, but for a few clients, we need to redirect a few specific pages as well and I can not figure out how to do about doing that. I've been searching online and have tried a number of options, but none have worked.

    Essentially, what I need to do is take

    subdomain.domain2.com/this-page/
    and redirect it to
    subdomain.domain1.com/this-page/

    Anyone know how to do that effectively? I've got some clients that are freaking out due to broken links and want to help them, but I'm stuck..

    Thanks again!!

  • skishopmatt
    • Site Builder, Child of Zeus

    Oh, by the way, as a side note, I forgot to mention that the ultimate goal would be to make any inner link on subdomain.domain2.com go to the new correct innerlink on subdomain.domain1.com - don't know if that's possible, but that would be a life saver..

  • Patricia BT
    • Connector

    @skishopmatt : Woowww, I just saw you gave me rep points and I thank you very much for that!! And you gave me a lot!

    I'm glad I could help,
    For your other question I will let @Alexander Rohmann answer it, as I don't want to give wrong information.

    I wish you all the best with your site!
    Cheers
    Patricia

  • Alexander
    • DEV MAN’s Mascot

    Hi @skishopmatt,

    For a quick fix, you could install this plugin on the old site: http://wordpress.org/plugins/redirection/

    It's absolutely fantastic for simply sending a URL someplace else with a proper 301

    Otherwise, you could give this a try:

    RewriteCond %{HTTP_HOST} ^subdomain.domain2.com\/this-page$
    RewriteRule ^/?$ "http\:\/\/subdomain.domain1\.com\/this-page\/" [R=301,L]

    Notice how the \ character is used. This is called "escaping" and it basically tells regex to use the following character as it's true self instead of as one of the matching symbols.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.