Any way to force https for Webmail

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
1,088
Is there a way in DirectAdmin to force https for WebMail?
Do you have a method you use?

Thanks!
 
I thought this was already discussed in the past few days.

You can use a .htaccess and mod_rewrite to do it.
 
I thought this was already discussed in the past few days. You can use a .htaccess and mod_rewrite to do it.
Thanks Floyd. I didn't see that in my searches. I doctored the Squirrel index.php like this so that it is not a user option and need to be added to every site

- Edit index.php
- Comment out the line that reads:
header('Location: src/login.php');
- Enter a new one below it that reads:
header('Location: https://<server.domain.tld>/webmail/src/login.php');

While this method allows it to be enforced from one location, it still is not completely without issue. It doesn't survive updates so I would need to turn off automatic updates for web apps and doesn't work with all webmail apps.

I didn't want to make a suggestion for a setting in directadmin.conf until I knew for sure such an option didn't already exist.

Thanks!
 
Last edited:
Was there something wrong with using mod_rewrite which would survive updates? And you would not have to make any other changes?
 
Back
Top