RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule (.*) http://%1%{REQUEST_URI} [R=301,L,QSA]