*in case you are on centos or RHEL else find the respective config files for apache on your linux flavor.*
Actually easy. You just change some apache file.
go to /etc/httpd/conf.d
edit roundcubemail.conf
this is the content of the file roundcubemail.conf
#
#
# Note: Please refer to /etc/httpd/conf.d/ssl.conf for SSL/TLS setting.
Alias /mail "/var/www/roundcubemail/"
<Directory "/var/www/roundcubemail/">
Options -Indexes
</Directory>
change this to :
Alias /mail "/var/www/roundcubemail/"
<Directory "/var/www/WHATEVERDIR/">
Options -Indexes
</Directory>
as you see this is the file that sets mail to the roundcubedir use your new dir now . (replace whateverdir with your squirrymail) as for roundcube you can just delete the entire roundcubeemail dir in /var/www/ but you don't have to.
as for redirecting www.whatever.com to www.whatever.com/mail it wil now work as you just corrected where /mail goes to.
reboot server just to be sure all changes worked.
regards,