Remove http://www.prowpservices.com and re-add it just as prowpservices.com then?
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
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 π
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.
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.
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
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 π
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..
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 π
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.
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.