deny from all
ErrorDocument 404 /404.html
order deny,allow
RewriteEngine on
RewriteCond %{HTTP_HOST} ^XXX.com$ [NC]
RewriteRule ^(.*)$
"http://www.XXX.com/$1"
[R=301,L]