{
    my $status = $roundcube{'status'} || "disabled";
    return "    # roundcube is disabled in this VirtualHost"
            unless $status eq 'enabled';

{
if ($port ne "443")
{
$OUT .= <<'HERE';
## Redirect roundcubeWeb Address to Secure Address
RewriteEngine on
RewriteRule ^/roundcube https://%{HTTP_HOST}/roundcube
RewriteRule ^/roundcubemail https://%{HTTP_HOST}/roundcubemail

## End Of Redirect
HERE

if ((exists $roundcube{'URL'}) && ($roundcube{'URL'} ne '')) {
    $OUT .= "RewriteRule ^/$roundcube{'URL'}  https://%{HTTP_HOST}/$roundcube{'URL'}\n";
    }
}
}
}
