in reply to automatically converting a URL to www
Yes, (in case you run apache) the easiest way is to create a virtual host that redirects to the generic address. See for example http://blog.bartlweb.net/2011/04/redirect-via-apache-virtualhost/ for the simple recipe.
In Section
Seekers of Perl Wisdom