HTTP to HTTPS
Question asked by Devang Shah - April 15, 2016 at 3:32 PM
Answered
Hello,
 
is there a possibilty in Sm 14 or SM 15 to redirect from HTTP to HTTPS?
 
http://mail.domain1.com to httpS://secure.maindomain.com
 
http://mail.domain2.com to httpS://secure.maindomain.com
 
i have tried IIS Rewrite but it will force all domain to HTTPS for their respective domain only and not to one specific domain 
 
Domain regiatrar has option to forward entire domain and not part of it and also many domains are managed by diff registrars so even that is not workable option 
 
regards,
Devang 
 
 
 
 

9 Replies

Reply to Thread
5
Scarab Replied
Marked As Answer
Devang,
 
This is what we use in our web.config (in the system.webServer section):
 
<rewrite>
    <rules>
        <rule name="Smartermail Force SSL" stopProcessing="true">
            <match url="(.*)" />
            <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                <add input="{HTTPS}" pattern="Off" />
            </conditions>
            <action type="Redirect" url="https://secure.maindomain.com/{R:1}" />
        </rule>
    </rules>
</rewrite>
0
Bruce Barnes Replied
Great HTTP to HTTPS rewrite rule, Scarab. Thanks for posting.
Bruce Barnes
ChicagoNetTech Inc
brucecnt@comcast.net

Phonr: (773) 491-9019
Phone: (224) 444-0169

E-Mail and DNS Security Specialist
Network Security Specialist

Customer Service Portal: https://portal.chicagonettech.com
Website: https://www.ChicagoNetTech.com
Security Blog: http://networkbastion.blogspot.com/

Web and E-Mail Hosting, E-Mail Security and Consulting
1
Devang Shah Replied
Dear SCARAB,
 
Great Rule, worked like Magic, thanks for posting 
 
all should try this simple code for HTTP to HTTPS rewrite
 
Regards,
Devang  
1
Hemen Shah Replied
Hi,
 
Implemented the rewrite rule given by Scarab and worked like charm, but post that i notice that email id creation through HELM is giving error and users on helm panel are not able to create email ids, i tried removing this rule and it works, so can anyone guide why is this rule creating issue.
 
Thanks
0
Hemen Shah Replied
Sorted, actually webservices url was already getting redirected to https due to which email id creation through control panel was giving error, now have excluded the same in the rewrite rule and works fine.
 
Thanks
0
Andrea Rogers Replied
Employee Post
Hey guys!
 
First off, thank you, Scarab for posting your workaround script. We appreciate your participation in the Community.
 
Secondly, I just wanted to send a quick note that an option to force HTTPS will be included in SmarterMail 16.x, which is currently in BETA and will be available within the first quarter of this year. The setting will be found by System Administrators in the Miscellaneous Settings > Server Info section. The following settings will be available: Require SSL and Allow domains to override SSL Requirement.
 
Prior to enabling this setting in SmarterMail 16.x, you must ensure the product is set up as a site in IIS and have a valid SSL certificate in place on the server. SmarterMail 16.x is currently in BETA, so keep an eye out for the final release! ...Coming soon!
 
Thank you!

Andrea Rogers
Communications Specialist
SmarterTools Inc.
(877) 357-6278

www.smartertools.com

0
Andrea Rogers Replied
Employee Post
I posted a more detailed reply down below, but I wanted to add a quick note here as well. The ability to force HTTPS will be included natively in SmarterMail 16.x.

Andrea Rogers
Communications Specialist
SmarterTools Inc.
(877) 357-6278

www.smartertools.com

0
Hello Bruce,

I have comodo SSL for my smartermail server 13.x. After following this article also, still URL redirection fails. Am i missing something which am supposed to follow. I just want to redirect the URL from HTTP to HTTPS.

kindly guide me, Thanks.
0
Hello Scarab,

I have comodo SSL for my smartermail server 13.x. After following this article also, still URL redirection fails. Am i missing something which am supposed to follow. I just want to redirect the URL from HTTP to HTTPS.

Even i applied this setting in \SmarterMail\MRS\web.config.

\\----below error am getting ----//

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
\\---------//

kindly guide me, Thanks.

Reply to Thread