For starters, adding the following to your .htaccess will convert all non-www to www.
That solves half your problems
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
--------------- Added [DATE]1308502216[/DATE] at [TIME]1308502216[/TIME] ---------------
Also in AdminCP>Settings>Options>Friendly URLs>
Choose the style you'd like to use, then set
Enforce Canonical URL to strict, and
Enforce Canonical URL for Registered Users to yes.