The MU forums have moved to WordPress.org

How to set home page with www.? (14 posts)

  1. visitsite
    Member
    Posted 17 years ago #

    Hi,
    By default WPMU redirects to non www version. Would prefer to know how this can be overridden? Will it give any further trouble?

  2. donncha
    Key Master
    Posted 17 years ago #

    Edit the .htaccess and remove the first few rules, but it may cause problems for lookups and signups.

  3. itdamager
    Member
    Posted 17 years ago #

    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 );

  4. mrball
    Member
    Posted 17 years ago #

    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! :)

  5. visitsite
    Member
    Posted 17 years ago #

    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.

  6. Toucouleur
    Member
    Posted 17 years ago #

    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...

  7. Toucouleur
    Member
    Posted 17 years ago #

    up

  8. honewatson
    Member
    Posted 17 years ago #

    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]

  9. drmike
    Member
    Posted 17 years ago #

    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.

  10. honewatson
    Member
    Posted 17 years ago #

    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

  11. ckck
    Member
    Posted 15 years ago #

    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.

  12. cafespain
    Member
    Posted 15 years ago #

    @ckck: actually I hope it doesn't as the www isn't needed.

  13. ckck
    Member
    Posted 15 years ago #

    @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.

  14. cafespain
    Member
    Posted 15 years ago #

    @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.

About this Topic

  • Started 17 years ago by visitsite
  • Latest reply from cafespain