Thomas Lomas

Software Engineer / Web Developer (Charlotte, NC, USA / Remote)

tlomas@gmail.com / GitHub / LinkedIn


Redirect non-WWW to WWW

To redirect WWW to non-WWW simply put the following in your .htaccess file:

RewriteEngine On
RewriteCond %{HTTPHOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTPHOST}/$1 [R=301,L]