Support » Networking WordPress » Force www on multisite.

  • Resolved Celinal


    I used the following snippet to force www on my domain, and it did seem to work. But all other sites are redirecting back to my main site. E.g goes through to Now I don’t want that. So is there another way to hack the .htaccess file?

    RewriteCond %{HTTP_HOST} !^$
    RewriteRule ^(.*)$$1 [R=301]

    Any help will be greatly appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    Just install it when your site is using the www. No need to force anything.

    So sorry, but I don’t understand what you are saying. I have already installed everything and it is all live. How can I go from there to have www on my domain?

    Thank you for the prompt reply =)

    I need to know this too.


    What she said was ‘If you set up your site, from day one, to be, then it’ll be fine.’

    Also that .htaccess hack works, but … I think you want this.

    RewriteCond %{HTTP_HOST} !^$
    RewriteRule ^(.*)$$1 [R=301]

    Thanks for the reply! Yes, I was afraid that is what she meant.

    After many, many failed attempts I figured the code should be placed in the root .htaccess (duh!) since this domain I am talking about is an add-on. Turns out your code works wonders. Everything should be in order now.

    Thank you! I really appreciate your help. 😀

    Oh yeah, above the WordPress lines in your root .htaccess is best 🙂

    The only time you’d want to add those to the subdomain .htaccess would be if you want to redirect THAT back around to the MAIN domain (which … I did recently when I flipped from subdomains to subfolders for another site).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Force www on multisite.’ is closed to new replies.