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

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Remove http://www.prowpservices.com and re-add it just as prowpservices.com then?

    Thread Starter kuld33p

    (@kuld33p)

    but then it would act like search4seo.com

    which I don’t want..

    I want it to behave like revolutioners.com

    like it does no matter how i type in..

    whether revolutioners.com or http://www.revolutioners.com

    it always resolves it like

    http://www.revolutioners.com

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Woulda been useful if you’d mentioned that πŸ˜‰

    Why? Neither www or non-www have any weight on your SEO ranking, and IMO shorter URLs are better.

    Also. WHICH domain mapping plugin are you using? They behave differently and there are, apparently, a handful πŸ™‚

    Thread Starter kuld33p

    (@kuld33p)

    I am using this plugin

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

    Now the behavior entirely depends upon how I added the domain name in the multisite domain mapping plugin..

    I added search4seo without www prefix and it takes me to http://search4seo.com automatically..

    I added prowpservices with www prefix and it takes me to http://www.prowpservices.com all the time..

    I agree it does not make any difference in SEO but I want to know the reason so that I can fix it.. and what intrigues me most is that it does not have any impact on the main network site.. which is revolutioners.com where all these 3 sites are hosted.

    My only and biggest problem is that redirect that happens when someone tries http://prowpservices.com which takes users to register a new site.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Can’t tell you why, except that, IIRC, MultiSite gets a bit weird when you add a site in with www. in the domain name.

    My only and biggest problem is that redirect that happens when someone tries http://prowpservices.com which takes users to register a new site.

    Then, like I said, remove http://www.prowpservices.com and re-add it just as prowpservices.com to fix the redirect. Then it all goes to non-www.

    You could try an htaccess tweak, if you’re dead set on defaulting to www version

    Put this ABOVE your WordPress calls:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www.your_domain.com$
    RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]

    Obviously fix it for your domains.

    Thread Starter kuld33p

    (@kuld33p)

    hey ipstenu thanks for helping me out..

    i dugg more on that plugin forum and found this.

    havn’t tried it.. but do you suggest i should

    http://wordpress.org/support/topic/plugin-wordpress-mu-domain-mapping-add-an-www-prefix?replies=7

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    I wouldn’t edit the plugin. I’d go to use the non www version of the site as my default. But I like shorter URLs. I never type in www πŸ™‚

    Thread Starter kuld33p

    (@kuld33p)

    Post from rahul did the work for me..

    Its working.. I added mapped the domain with http://www.prowpservices.com and it worked.. here is his post..

    ANYONE WHO COMES LOOKING FOR THE SAME PROBLEM.. I AM USING THE TRUNK VERSION OF THE PLUGIN DOMAIN MAPPING..and did not edit the domain-mapping.php file as suggested by Rahul.. all I did was edit the sunrise.php.

    in sunrise.php, add following code…

    if( “www.” != substr( $_SERVER[ ‘HTTP_HOST’ ] , 0 , 4) ){
    header(“Location: ” . “http://www.” . $_SERVER[ ‘HTTP_HOST’ ] . $_SERVER[ ‘REQUEST_URI’] , TRUE, 301);
    exit;
    }

    before line…

    $dm_domain = $wpdb->escape( $_SERVER[ ‘HTTP_HOST’ ] );

    BTW the plugin author (donncha) is on that thread too.. if there was any issues with editing the code of the plugin he would have pointed it out..

    But I thank you for your support..

    good job..

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    There aren’t errors in the code, it’s just that if donncha (or anyone else who works on it) pushes an UPDATE to the code, you lose your changes.

    Which is why I don’t edit code that way πŸ™‚

    Thread Starter kuld33p

    (@kuld33p)

    0_o

    oh oh..

    but i will keep that in mind.. and i don’t see any updated version of the plugin coming in near future.. if it happens to be.. i think he would definitely integrate this..

    πŸ˜€

    It’s coded that way because they (Ron & Donncha) had to pick what way it would work out of the box.

    So yes, adding them in a certain way over the other was deliberate. I can point either or both of them to this thread to see if they want to incorporate your changes or not.

    Thread Starter kuld33p

    (@kuld33p)

    Would be good if they add an option or automatically get this work out of the box so that people like me don’t come complaining about it..

    thanks marking resolved.

    Whether or not the added code added to sunrise.php works, the proper way to force the www is using the rewrite rules which @ipstenu posted. The code above won’t be added to the plugin.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘with domain mapping www.domain.com works domain.com does not’ is closed to new replies.