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