Redirect webmail for another domain for domain

sky

Verified User
Joined
Nov 12, 2004
Messages
338
Hello

I need to redirect one client webmail (/roundcube) to another domain (external mx server)

It does not work with a simple htaccess

I do not want to change it for all clients, just for one domain :
domain.com and www.domain.com

Thanks for any help !

Sky
 
Last edited:
Hello,

Then you might need to use mod_rewrite, and put it in /etc/httpd/conf/extra/httpd-includes.conf :

Code:
<Directory "/var/www/html/roundcube">

    RewriteEngine  on
    RewriteBase     /
    RewriteCond     %{SERVER_NAME} domain.com
    RewriteCond     %{REQUEST_URI} ^/roundcube
    RewriteRule     (.*) http://other-mail-host.com/here$1 [R,L]
</Directory>

You might need to update

Code:
 RewriteCond     %{SERVER_NAME} domain.com

to catch both domain.com and www.domain.com
 
Hello

I get the point !

I was thinking perhaps ther whas a "intrernal DA solution", but ill try this :)

Thx for the help.
 
Back
Top