Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Help with www to no www

edited December 2011 in Vanilla 2.0 - 2.8

Hi guys, how do I force my users to go to my no www site rather than go to the www version of my site? cookies are all effed up if they go to the www site.

Best Answer


  • Options

    or is there a way to allow the same cookies on both the www and the no www version of my site?

  • Options
    422422 Developer MVP
    edited December 2011 Answer ✓


    # Redirect non-www urls to www
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.yoursite\.com
    RewriteRule (.*)$1 [R=301,L]

    More here.

    There was an error rendering this rich post.

  • Options

    Thanks a lot! :)

  • Options

    and for the subdomain? like i got and i want work too? and where do i place the htaccess file, in the main forum directory?

Sign In or Register to comment.