Using virtual hosts I have gotten into the habit of using this:
<VirtualHost: *:80>
ServerName www.example.com
Redirect permanent / http://example.com/
</VirtualHost>
Yet I often see rewriting used instead:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
Is there any advantage to one approach over the other?