Insert this into the top of your .htaccess file, making sure that ‘RewriteEngine On’ comes before it:
RewriteCond %{HTTP_HOST} !^www\.jhuskisson\.com [NC]
RewriteRule ^(.*)$ [R=301,L]
Replace jhuskisson.com with your chosen domain and make sure if you are placing any full stops within the first line to enter a backslash before each full stop. This will prevent the code from not working.

Like this site? Subscribe on Facebook and follow on Twitter
Follow @jhuskissonShare this with friends:
Like what you've just read? Share it to your friends using your favourite service below:
Tweet
Comments:
Pingbacks/Trackbacks:
[...] a plugin; Force www. (without .htaccess) – vBulletin.org Forum or here's how using htaccess; Force www. in your URL using .htaccess : Blog : Jamie Huskisson __________________ Mikey / vBulletinSetup Staff Validate your vBSetup Account. Click Here. [...]
Add a Comment: