• Resolved epschmidt

    (@epschmidt)


    Posted this yesterday in the general support forum before remembering there was a multisite forum:

    To use an existing SSL certificate I need to move our site from not using www by default to use www so we don’t get security errors. I’m running 3.0 Multisite with the Domain Mapping plugin. I had WP-Super Cache but disabled it and deleted the cache files for the time being.

    I’ve tried search and replace for domain.com and replacing with https://www.domain.com on the database as well as adding the following redirect rule to .htaccess.

    RewriteCond %{HTTP_HOST} ^domain\.com [NC]
    RewriteRule ^(.*) https://www.domain.com/$1 [R=301,L]

    Neither have worked. If i just do the .htaccess redirect, it produces a redirect loop. If I do the search and replace adding https://www.domain.com to the database along with the .htaccess redirect, all pages and links are redirected back to the homepage. Am I missing something? Is there a different way to do it with a multisite setup?

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

    (@ipstenu)

    ?????? Advisor and Activist

    Check your wp-config.php file for what the basic name is? I think you have a DOMAIN_CURRENT_SITE as domain.com and not https://www.domain.com?

    Thread Starter epschmidt

    (@epschmidt)

    I believe I tried changing that, but I set the DOMAIN_CURRENT_SITE as “www.domain.com”.

    Should it be the full url? https://www.domain.com?

    Thread Starter epschmidt

    (@epschmidt)

    Also, in researching I came across this post from Andrea on this issue for WPMU, https://wpmututorials.com/hacks/forcing-mu-to-use-www/.

    I started the site in MU and have since upgraded to 3.0. She mentions the problem in her post will be fixed with 3.0, but I still have the wpmu-settings.php file in my root folder. Is this safe to remove? Or do I need to keep it since I’ve upgraded from MU and did not do a clean install?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Should be WITHOUT the https:// — The forum changes it for me!

    Under Super Admin -> Sites, click on Edit for your main site and check what the URL is. Mine is domain.com (since I don’t like the www). Yours should be www. obviously. Just making sure it’s everywhere.

    I think you can get rid of that file. Try renaming it to .txt to see what happens?

    Thread Starter epschmidt

    (@epschmidt)

    OK, I think I got it almost working. I changed the DOMAIN_CURRENT_SIte to “www.domain.com” and also did a search/replace through the database to update the urls to “www.domain.com”. Now entering domain.com, you are redirected correctly to https://www.domain.com, and all the links on the page work correctly leading to https://www.domain.com.

    One problem remains, trying to enter a page’s url directly, like domain.com/about/ only leads back to https://www.domain.com. Would I have to do something in .htaccess to get these to direct to the right place?

    Side Note: When I first made the changes, my admin links all lead to my home page. But removing or renaming wpmu-settings.php like you suggested took care of that with no apparent side effects. I must have mistakenly left that in my root folder when I did the upgrade.

    Thanks for your help.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Where did you put your .htaccess rule? Above the WordPress section?

    I use the same one (backwards) and it works fine.

    Thread Starter epschmidt

    (@epschmidt)

    I had taken that .htaccess redirect out to prevent a redirect loop, but when I put it back in, all is working as expected. Thanks again for your help.

    Also, in researching I came across this post from Andrea on this issue for WPMU, https://wpmututorials.com/hacks/forcing-mu-to-use-www/.

    This is old old old and no longer relevant for this version. It *will* handle the www.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Move from non-www domain to www domain’ is closed to new replies.