You can use a CNAME in DNS to point another name to the same address as a different name, making it easier to change the IP of both. I.E. if your mail www and ftp are all on the same IP you can setup one and point the other two at the first so if the IP changes only one needs to change.
However, this is not redirection. If you use either or both in your web pages, the domain name will not change as you navigate. That must be accomplished through some other means. Basically you need to do as mentioned above with a 301 Permanently Moved or 302 Temporarily Moved. This can be accomplished in a large number of ways either with the web server or with code.
If you are using Apache, look at mod_rewrite which is typically enabled by default. This can either go into your config or your .htaccess as you mentioned. If you are using another web server consult its documentation.
By code you can emit a Location header to effect the redirect. Most languages have libraries that will assist you in this process.