#www RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule ^.*$ http://www.domain.com%{REQUEST_URI} [R=permanent,L]