WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Redirects with www & non-www (3 posts)

  1. Andrew Tegenkamp
    Member
    Posted 1 year ago #

    We have a multisite and domain mapping but cannot get it to redirect and add the www correctly.

    For example, http://northstarfamily.org/news/ redirects back to http://www.northstarfamily.org/ but http://www.northstarfamily.org/news/ works great.

    It works fine on the other domain (plugin WordPress MU Domain Mapping) as http://www.northstarpulaski.org/news/ ends up at http://northstarpulaski.org/news/

    I thought this was because the main site was setup as http://www.northstarfamily.org so I did these 3 updates and also updated DOMAIN_CURRENT_SITE in wp_config:

    UPDATE wp_options SET  option_value =  'http://northstarfamily.org' WHERE  wp_options.option_id =1;
    UPDATE wp_options SET  option_value =  'http://northstarfamily.org' WHERE  wp_options.option_id =36;
    UPDATE wp_sitemeta SET  meta_value =  'http://northstarfamily.org/' WHERE  wp_sitemeta.meta_id =14;

    This just gave me the redirect loop so I put everything back for now while I seek some help. Does anyone have any ideas? At this point I don't have a preference if www is there or not but I would like both to work!

    I also tried some htaccess redirects above, during, and after the #BEGIN WORDPRESS# area but those always ended up giving me an Internal Server Error. I'm hosted with Dreamhost.

    Thanks,
    Andrew

  2. I have never used the Domain Mapping plugin you reference, but your data suggests that the preference is to have the naked domain set as primary. I usually start off at the hosting level with and A record for the naked domain and a cName for www, although I understand that with this domain mapping plugin you can have a subdomain www that is distinct from the naked domain.

    Coming to WordPress, it's curious that you chose 3 queries, but it seems to me that there are two that wouldn't get picked up and they are pretty important, namely the wp_site and wp_blogs.

  3. Andrew Tegenkamp
    Member
    Posted 1 year ago #

    Thanks Pali,

    I did just miss wp_site and wp_blogs as you suggested. This is the only multi-site blog I run at this time so I missed them in the database looking for URLs!

    It turns out it was not the plugin (thankfully since this setup runs 3 sites on 2 domains with more hopefully coming) and it looks like the plugin actually checks for www and non-www as now both domains redirect as I hoped such as http://www.northstarfamily.org/news/ and http://www.northstarpulaski.org/news/

    I appreciate the support!
    Andrew

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.