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

Help with www to no www

kjaonlinekjaonline
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

Answers

  • 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 ✓

    Htaccess

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

    More here. http://www.htaccessbasics.com/force-www-nonwww-domain/

    There was an error rendering this rich post.

  • Options

    Thanks a lot! :)

  • Options

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

Sign In or Register to comment.