# Those aliases do not work properly with several hosts on your apache server
# Uncomment them to use it or adapt them to your configuration
#    Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
#    Alias /roundcube /var/lib/roundcube

<ifModule mod_rewrite.c>
    RewriteEngine On

    RewriteRule ^/roundcubemail/[a-f0-9]{16}/(.*) /roundcubemail/$1 [PT,L]
    RewriteRule ^/webmail/[a-f0-9]{16}/(.*) /webmail/$1 [PT,L]

    # Be compatible with older packages and installed plugins.
    RewriteCond %{REQUEST_URI} ^/roundcubemail/assets/
    RewriteCond %{REQuEST_URI} !-f
    RewriteCond %{REQuEST_URI} !-d
    RewriteRule .*/roundcubemail/assets/(.*)$ /roundcubemail/$1 [PT,L]

</ifModule>

Alias /roundcubemail /usr/share/roundcubemail/public_html/
Alias /webmail /usr/share/roundcubemail/public_html/

# Access to tinymce files
#<Directory "/usr/share/tinymce/www/">
#    Options Indexes MultiViews FollowSymLinks
#    AllowOverride None
#    Order allow,deny
#    Allow from all
#</Directory>

<Directory "/usr/share/roundcubemail/public_html">
    Options +FollowSymLinks
    AllowOverride None
    <ifModule mod_authz_core.c>
        Require all granted
    </ifModule>
    <ifModule !mod_authz_core.c>
        Order Allow,Deny
        Allow from All
    </ifModule>
</Directory>
