Skip to:
Content
Pages
Categories
Search
Top
Bottom

Redirecting non-www to www version

  • @chandersbs

    Member

    My site is both www and non-www. If I’m logged in the www version and I visit the non-www version, it shows that I’m not logged in.

    I just want to keep only the www version, I know this can be done via redirect, but how exactly for bbpress does this work.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @nightgunner5

    Member

    Add

    RewriteCond %{HTTP_HOST} !^www. [NC]
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301]

    to your .htaccess (right under RewriteEngine On)

    @chandersbs

    Member

    Thanks.

    I tried that code.

    The result:

    http://domain.com now goes nicely to http://www.domain.com

    If I encounter problems, I’ll let it be known.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar