[BlueOnyx:20316] Re: Roundcube Alias

Michael Stauber mstauber at blueonyx.it
Mon Nov 28 12:30:56 -05 2016


Hi Colin,

> Should just be able to put it the conf.include ... but I just haven't got it quite right.
> Hopefully one of the apache gurus on here can give me a lead!
>
> Alias /mail /roundcube

Not quite. The righthand side of the Alias needs the full path to the
directory on the file-system. So try this:

Alias /mail /home/.sites/28/site1/web/roundcube/

That would go into the site1.include file.

If you generally want to redirect all /mail to the matching /roundcube,
then you'd need to put something in /etc/httpd/conf.d/webmail.conf for
example. There a RewriteRule would be better as it's not that stringent
about having to have the file-path as the target, but it can be an URL
or partial URL:

RewriteEngine On
RewriteCond %{HTTP_HOST}                ^([^:]+)
RewriteRule ^/mail/?$                  /roundcube [L,R]

Or say all your Vsites have SSL certificates anyway and you sure want to
redirect all /mail to https://<site>/roundcube to make them secure, you
could use this instead:

RewriteEngine On
RewriteCond %{HTTP_HOST}                ^([^:]+)
RewriteRule ^/mail/?$                  https://$1/roundcube [L,R]

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list