I\'m trying to figure it out how to set up an .htaccess set of rules that would force the presence of the \"www\" in front of the domain if it is not initially specified, bu
RewriteCond %{HTTP_HOST} ^example\.org
RewriteRule ^ http://www.example.org%{REQUEST_URI} [L,R=301]
This will not redirect subdomains like mail.example.org
This mod_rewrite rule should do it for second level domains:
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]