WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Multisite - when no www subdomain, redirect problems (6 posts)

  1. animalien
    Member
    Posted 1 year ago #

    Here is the problem. I have set up my wordpress so when someone wants to go to my "About" page, they only have to type in: geekazine.com/about

    The problem is if they don't put in the www in the address - http://www.geekazine.com/about it will not go to that page. Instead, when you type in "geekazine.com/about" it comes to a page that says:

    You are currently allowing “none” registrations. To change or disable registration go to your Options page.

    How can I make it so people don't need the "www"? All other subdomain websites work in Multisite.

  2. When you set up Multisite, it actually warned you NOT to leave WWW in there. This is (part of) why.

    Put this in the very top of your .htaccess:

    # Force the "www."
    RewriteCond %{HTTP_HOST} !^www\.geekazine\.com$ [NC]
    RewriteRule ^(.*)$ http://www.geekazine.com/$1 [R=301,L]
  3. animalien
    Member
    Posted 1 year ago #

    Thanks but that did not work. It rerouted all my subdomain sites. (dorkazine.com [dork.geekazine.com] went back to geekazine.com when I put that code in)

    I don't remember it asking me about the www part. Then again I did try to do Multisite with this system a few years ago.

    Should I remove it from MySQL or something?

  4. Then do this:

    RewriteCond %{HTTP_HOST} ^geekazine\.com$ [NC]
    RewriteRule ^(.*)$ http://www.geekazine.com/$1 [R=301,L]
  5. animalien
    Member
    Posted 1 year ago #

    That did the job!! Thanks!

  6. animalien
    Member
    Posted 1 year ago #

    Closed.

Topic Closed

This topic has been closed to new replies.

About this Topic