Htaccess redirect www to non-www

1. Example

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} www.example.com
RewriteRule (.*) http://example.com/$1 [R=301,L]