rewritecond %{http_host} !^www\.yourdomain\.com [nc] rewriterule ^(.*)$ http://www.yourdomain.com/$1 [r=301,l]