Installing and upgrading help

http to https in windows server

 
Picture of J Guzman
http to https in windows server
 

Hi all!


I have my website up and running but I seem not capable to get the redirector to work.  https traffic works all fine but http gets the error stating only secure traffic is allowed, which is expected.  This is my scenario:


Any advise is greatly appreciated.  Below is how my web.config file looks.




 
Average of ratings: -
Picture of Usman Asar
Re: http to https in windows server
Particularly helpful MoodlersPlugin developers

J, I assume you have mentioned/added https with port 443 in site bindings as well?

now reopen your URL re-write and delete the rules that you've created already, and start from scratch in terms of creating a new rule in URL rewrite

Make sure you are selecting URL ReWrite in SITES Options and NOT server menu.

Once URL Rewrite module opened, click ADD RULE from action pane window.

Select BLANK RULE, this will open Edit Inbound Rule window.

Give any name in NAME box (like http to https)

keep requested URL as default : matches the pattern

and keep using as well default: regular expressions

on Pattern input, type (.*)  -- thats open round bracket, dot, asterisk and close round bracket

keep ignore case checked, and now move to conditions

open conditions menu, click ADD, in add condition window, type {HTTPS} (thats curly bracket) in condition input line.

check if input string --> keep default as Matches the pattern

in pattern type ^OFF$

Now move to Action drop down

choose action type : Redirect (Rewrite is default selected)

in redirect URL, type: https://{HTTP_HOST}/{R:1}

keep Append query String check box selected

finally from Redirect type, select See Other (303)

Click Apply in right hand pane and you're done.

alternatively you can apply above in our web.config file as well, whatever suits you.

now test the redirect if it works fine.








 
Average of ratings: -
Picture of J Guzman
Re: http to https in windows server
 

Usman,


Thank you for your reply.  I did follow your instructions but I  am still getting the error.  Now, funny thing, I cleared the SSL settings in IIS10 and now it does work (see picture).  I thought those checks shall be checked for it to work.   I was wrong . but I am happy about that since it now redirects to https and the whole site is encrypted, not only the logon screen (which I was been pressed to keep, instead of whole site encryption).


THANK YOU VERY MUCH!!!!


J.Guzman


 
Average of ratings: -