Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Vanilla 2.3 fully supports PHP 7. Get it now!
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

re-write www to non www

Hi Guys,

Im using the defaul .htaccess file that comes with vanilla.

My forum sites in a filder /forum

Does anyone know what to add to the .htaccess file to re-write all www URLs to non www.

Have tried a bunch of things but no joy.

Any examples would be helpful!
Tagged:

Comments

  • LincLinc Vanilla's Bard (and Lead Developer) Detroit Vanilla Staff
    This isn't really Vanilla-specific, but here it is:

    After "RewriteEngine On" add this (obviously substituting your domain name):

    RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
Sign In or Register to comment.