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

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny