Weaver Tips

The best tips for working with RapidWeaver

Force non-www

Force non-www

May 7th, 2018 by Gregory

To force users to the non-www version of your site, simply add the following to your .htaccess file:

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

When users visit your site, they will be redirected from http://www.example.com to http://example.com.