Hi,
By default WPMU redirects to non www version. Would prefer to know how this can be overridden? Will it give any further trouble?
Hi,
By default WPMU redirects to non www version. Would prefer to know how this can be overridden? Will it give any further trouble?
Edit the .htaccess and remove the first few rules, but it may cause problems for lookups and signups.
I don't think it matters because lines 8 and 9 in wpmu-settings.php strips the 'www.' off if it exists:
if( substr( $domain, 0, 4 ) == 'www.' )
$domain = substr( $domain, 4 );
yep, the non 'www.' appears to be pervasive throughout the application. Can still be done though, add another layer of script before WPMU that adds the www. back! :)
add another layer of script before
mrball,
What layer you are talking about?
Still trying other options and no success yet.
Thanks everyone for your input.
mrball how could we apply this layer to add the www ?
I've tryed myself to remove some few lines code, but without success.
In fact some people like I, have some high ranked web site with http://www.xxxxxxx using only http://xxxxxxx could be a problem for futur referers...
up
Try this:
Under >>Site Admin >> Blogs >> Edit Main Blog
Change the field "Home" from:
http://domain.com to http://www.domain.com
Then in your http access file replace:
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^(.*) http://%1/$1 [R,L]
with
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L]
In fact some people like I, have some high ranked web site with http://www.xxxxxxx using only http://xxxxxxx could be a problem for futur referers...
Offically, Google, MSN, and Yahoo counts them as the same site.
Unoffical, Google does assign a different PR to http://tdjc.be and http://www.tdjc.be but, after I raised the issue with them, they said it straightens out the second PR update after being added.
For my purposes I need the www.
My solution above has worked for me. Its crucial that you only add 'www.' to the 'Home' field and leave the others as http://yourdomain.com
This is One Way to Get WordPress MU 2.7 to Properly Install on a WWW Dot Domain Name.
http://www.manythings.org/b/c/6
I struggled with this for a long time, so hopefully this will help someone else save a little time. Much of the information I found was for previous versions of WordPress MU.
Hopefully, in future versions of WordPress MU, it will be possible to install on a "www.domain.com" without needing to do any hacking.
@ckck: actually I hope it doesn't as the www isn't needed.
@cafespain: I needed to use the "www." in this case, otherwise I would have done it the easy way, as I have on other websites.
@ckck I disagree, nobody NEEDS the www. in the WordPress MU install. Everything can (and should) be handled at DNS level, so that BOTH www. and non www. urls resolve and work.