Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L] [edited by: incrediBILL at 9:34 pm (utc) on May 13, 2012]
[edit reason] fixed RewriteCond syntax per g1's request [/edit]
By convention, domain names can be stored with arbitrary case, but domain name comparisons for all present domain functions are done in a case-insensitive manner
RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$ [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
By convention, domain names can be stored with arbitrary case, but domain name comparisons for all present domain functions are done in a case-insensitive manner
Darn it, phranque, we were going to force him to work it out for himself :-P