how to manage url redirects in drupal 7
I always use the vhost file for this:

# Enforce domain.
RewriteCond %{HTTP_HOST} !^example.com(:.*)?$
RewriteCond %{HTTP_HOST} ^(?:.*?)(:.*)?$

RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]


I would much rather to this on the Apache level, than PHP, to keep it as fast a possible.

Similar configuration for nginx here.