Page is a not externally linkable
Robert_Charlton - 4:11 am on Feb 11, 2013 (gmt 0)
"RedirectPermanent" suggests that you're not planning to use mod_rewrite to do the redirects. Using mod_rewrite would enable you to properly canonicalize the domain, and I recommend it as the way to go.
Assuming you're running on Apache, we've got an Apache Web Server forum [webmasterworld.com...] with a library that could provide basic code and background, and advise you if you need further help.