Date Posted : 10/01/2019

In this tutorial, we are going to explain you about forcing webmail http requests to https automatically.

In order to achieve it, you can edit /var/lib/roundcube/.htaccess file and add the below rules under RewriteRule section

#force SSL usage
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

We’re going to verify it using curl request.

$ curl -I http://mail.pheonixsolutions.com/webmail/
HTTP/1.1 302 Found
Server: nginx
Date: Thu, 10 Jan 2019 07:10:57 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: https://mail.pheonixsolutions.com/webmail/

Leave a Reply