• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved How to redirect webmail from HTTP to HTTPS

Hi AusWeb,

for roundcube, pls. consider to modify "/usr/share/psa-roundcube/config/defaults.inc.php"
Code:
...
// enforce connections over https
// with this option enabled, all non-secure connections will be redirected.
// set the port for the ssl connection as value of this option if it differs from the default 443
$config['force_https'] = true;

// tell PHP that it should work as under secure connection
// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
// e.g. when you're running Roundcube behind a https proxy
// this option is mutually exclusive to 'force_https' and only either one of them should be set to true.
$config['use_https'] = true;
...

In addition, you might consider to place a ".htaccess" - file at => "/usr/share/psa-roundcube" with the content:
Code:
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{HTTPS} !=on
   RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
 
Thank you @UFHH01

Prefered Solutions ".htaccess"

I have installed a Wildcard SSL for the server. so I've changed webmail url to server domain url

Code:
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{HTTPS} !=on
   RewriteRule ^(.*)$ https://webmail.server.tld/$1 [R=301,L]
</IfModule>
 
Last edited:
Ich wollte das in /usr/share/psa-horde/.htaccess machen. Dort steht aber:

# IMPORTANT: DO NOT EDIT THIS FILE!
# It will be overwritten with any future upgrade.

Gibt es eine haltbare Lösung?
 
Hi RaHa,

pls. write in ENGLISH only in public forum threads, as you accepted the forum rules, when you registered here. ;)
 
Back
Top