Support » Plugin: WordPress MU Domain Mapping » [Plugin: WordPress MU Domain Mapping] www and no-www redirection

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    MultiSite Guru

    IF you want Domain Mapping to respond to both the www and non-www map the non-www version of the URL.

    No, I dont want it to respond to both versions. I just want it to work with the www prefix and I want it to redirect non www requests to the www version of the domain name. Right now, it redirects to the main site which is really unpleasant.

    Plugin Author Ron Rennick

    (@wpmuguru)

    MultiSite Guru

    I just want it to work with the www prefix and I want it to redirect non www requests to the www version of the domain name.

    That would be responding to both versions. Domain mapping is designed to redirect the www to the non-www when you have the non-www mapped.

    For what you are trying to do map the www and add a rewrite rule to your .htaccess to redirect the non-www to the www.

    My only mapping for network site is with www.
    and if I type in the url without www, it redirect to the main site, not to the network site and that is a problem.

    Making the network site work both with www and with no-www is another problem, not as big a problem as the one above but it is still a no-no.

    This is a fresh 3.4 install all followed by the official instructions, nothing custom.

    Im no good with writing rewrite rules, is there a place that I can look at some samples and go from there?

    Plugin Author Ron Rennick

    (@wpmuguru)

    MultiSite Guru

    Can’t this be done in the A record (in your dns settings) I didn’t have to alter any htaccess or add any rewrite rule to get this to work.

    Im not sure about fixing it with a DNS entry. Both the http://www.example.com and example.com already resolves to the same IP address.

    I have my main setup running at…
    http://wp.mymainsite.com
    its a subdomain, not a tld, so this might a problem, i dont know.

    Then I have a domain mapping like this…
    http://wp.mymainsite.com/site1 –> http://www.example.com
    which works fine.

    However, when I type the domain without www leading, like…
    http://example.com I would expect two things, which neither happens.
    1- it redirect to the http://www.example.com or
    2- it serves the site as it has been typed like http://example.com

    I do not expect it to redirect the request to the main site, which happens unexpectedly…
    http://example.com –> http://wp.mainsite.com

    Now, I can add another domain mapping entry for the non-www version of my additional website
    http://wp.mymainsite.com/site1 –> http://example.com
    This will prevent non-www entries to my additional site to redirect to the main site.

    Now the new problem is I have two different versions of my website running with and without the www leading. Which it should not.

    A rewrite rule which redirects all non-www requests to the http://www.example.com in .htaccess will solve the problem. Which, I have not been able to write that entry yet.

    This MAY or MAY NOT be a problem or bug with the plug-in. I really do not know. This might be the way it works by design. If it is the way it works, maybe this issue should be documented.

    @backups, please tell me about your setup. How is your setup works out of the box?

    Plugin Author Ron Rennick

    (@wpmuguru)

    MultiSite Guru

    This MAY or MAY NOT be a problem or bug with the plug-in. I really do not know. This might be the way it works by design. If it is the way it works, maybe this issue should be documented.

    I explained above that it is by design. The correct way todo the redirect is with a rewrite rule.

    Plugin Author Ron Rennick

    (@wpmuguru)

    MultiSite Guru

    Further to my previous post – If you set up your WordPress network at http://www.domain.com, WP does not redirect domain.com to http://www.domain.com. You have to do that redirect with a rewrite rule as well. Domain mapping is designed to be consistent with WordPress.

    hgurol’ issue same to me

    example:

    wordpress mu = http://www.mucenter.com
    new domain = http://www.newbox.com

    step:

    1. point/park domain http://www.newbox.com in cpanel/directadmin
    2. mapping domain “www.newbox.com” in http://www.mucenter.com‘s admin page

    result:

    1. http://www.newbox.com go http://www.newbox.com = correct
    2. newbox.com go http://www.mucenter.com = false

    resolve:

    1. mapping domain “newbox.com” in http://www.mucenter.com‘s admin page too

    so now you have

    1. “newbox.com” in http://www.mucenter.com‘s admin page
    2. “www.newbox.com” in http://www.mucenter.com‘s admin page

    after that:

    1. http://www.newbox.com go http://www.newbox.com = correct
    2. newbox.com go http://www.newbox.com = correct

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: WordPress MU Domain Mapping] www and no-www redirection’ is closed to new replies.