Redirect domains without www to www with apache rewrite rules

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

Leave a Reply

Need Help With Code?