# (force addition of www depending on your cert) RewriteEngine On RewriteCond % !^www\. RewriteRule ^(.*)$ http://www.%/$1 [R=301,L]
When You need to change the root folder of the website transparently with no touching actual scripts, then this one would help.