• Resolved MBWD

    (@mbwd)


    I had a multisite network set up and running successfully at mywriting.network, but needed to change servers, and since then have been having some problems.

    Primarily, mapped domains are no longer working. Instead they are throwing redirect errors. I’m using the WPMU Domain Mapping plugin to handle mapping. I’ve got the normal WP htaccess for multisite straight out of the Codex at the site’s root level, but I also have another htaccess doc one level up, in username/public_html, which reads as follows:

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,NC,L]

    This was added in by the new server owner at my request to solve a previous problem I was having after the server move, when the http versions of all subsites were returning 404 errors, but the https versions were working. I guess this new rule is probably contributing to the mapped domain redirect error, but I am leery of changing it myself because it fixed the other problem.

    And, the other issue I’m having, which I think is related, is that while subsites do come up, their https seems to be broken. They are all saying they’re calling insecure images. I can trace the images and change the URL from http to https easily enough, but this was not happening on the old server and it’s not a practical solution to go into each and every site on the network and fix each and every image, especially since this issue seems like the symptom of something.

    I have two certs installed on the server, one for the main site and one wildcard, and have a dedicated IP as well.

    How can I rewrite the htaccess document(s) to prevent the redirect error for mapped domains and allow https to work properly for subdomains?

Viewing 9 replies - 1 through 9 (of 9 total)
  • If you are going to force everything to https, make sure all your site urls and home settings are https and not http.

    Thread Starter MBWD

    (@mbwd)

    I have my site set up in a user account within Cpanel. This means that my main site is actually an add-on domain of the FQDN that is assigned to my account. Does something need to be done differently when multisite is installed in a user account in Cpanel? Is this why I was getting all those 404s for subsites? They went away after I deleted the subdomain I had created… but https is still broken and domain mapping is still not working, and I am sure that things are still not properly set up for this installation. I’m just not sure where to look, and I’m also trying to do this with as little disruption as possible to my users.

    I think your cpanel setting are fine.

    What I am saying is to go into WP Network admin menu, site settings to see your SiteUrl and Home settings. Those setting needs to be https:// otherwise WP will continue to build http urls. The network settings urls look like this (for siteid=5):
    https://domain.com/wp-admin/network/site-info.php?id=5
    https://domain.com/wp-admin/network/site-settings.php?id=5

    Note that you might have multiple problems. You need to try to fix one at a time. The above suggestion is the first step.

    Thread Starter MBWD

    (@mbwd)

    HI jkhongusc
    Thanks, I should have acknowledged what you were saying. I am accustomed to doing what you are suggesting for single sites. Without trying to sound argumentative in the least, because I’m sure you know more than I do about this, it doesn’t make sense to me that I should have to do that to each of my subsites on this install when it wasn’t necessary on the previous install. Even if it does fix the issue at hand, as I mentioned above, the fact that I have to do it in the first place suggests to me that something deeper is wrong. My comments about Cpanel were an effort to figure out if the different levels of ownership (account holder versus root) might be the source of the trouble. I have a tech looking into it, but I’m still trying to do my own investigation and talk to as many people as I can.

    I did try changing the URLs for a couple of subsites to see if that had any effect on them. It didn’t seem to change anything. They are still loading but calling insecure images.

    Thank you for your response.

    > it doesn’t make sense to me that I should have to do that to each of my subsites on this install when it wasn’t necessary on the previous install.

    Are each installations identical – same WP core, same plugins, etc? I suspect not, which is why your assets are http. Can you give me an example WP page/post that contains the mixed content? I am assuming that these images are WP assets and not external urls. You might want to check your Media -> Library and verify the image urls. My suspicion is that you configured your site for http, then uploaded the images. At that point the images have urls with http. You will need a plugin to convert them all to https.

    Thread Starter MBWD

    (@mbwd)

    I cannot say they are identical. I did create the new one by importing the database and copying over the files from the old one, so the WP core is the same. Plugin configuration might have varied somewhat since then. This was in the past couple of weeks that I copied it over. These issues seemed to go away completely when I change the IP at Cloudflare back to the old server.

    If you look at test100.mywriting.network, you will see an example of what I mean. The site seems to load fine over https, but is loading an image from http (the small image in the header) and so doesn’t display a padlock (when logged in–this particular site shows a padlock when logged out.) But if you look at karengberry.mywriting.network, you’ll see a site that displays mixed content when logged out.

    Yes, the images are WP assets. You are probably right that I configured the site for http. Do you recommend a plugin that works well with multisite for converting http to https? Would Velvet Blues be a good one to use in this case?

    Thread Starter MBWD

    (@mbwd)

    The site address of my main site is set to http in Network Admin –> Sites — Info, but is set to https in Settings. Is this the source of the problem, do you think?

    Thread Starter MBWD

    (@mbwd)

    And I’m getting this error in Firefox for a placeholder domain (extremelyundercoverwebsite.com) that I have mapped to test20.mywriting.network:

    extremelyundercoverwebsite.com uses an invalid security certificate. The certificate is only valid for the following names: *.mywriting.network, mywriting.network

    So, why is my custom domain trying to use the security certificate that is assigned to my network? How can I find out where this is happening?

    Thread Starter MBWD

    (@mbwd)

    Just an update–I think I had a number of issues going on. The biggest problem was solved by moving my multisite back to my old server. Something about the new server (LiteSpeed) just wasn’t jibing, and even the server admin couldn’t figure it out.

    Once I moved back to my old server, domain mapping functioned properly once again.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Mapped domain redirects and subsite HTTPS issues’ is closed to new replies.