Redirect HTTP to HTTPS using IIS is not working
-
06-10-2020 - |
문제
I have a Web Application. Its AAM is as follows-
Zone Public URL for Zone
Default http://sharepoint:46543
Internet http://abc.something.com
Custom https://abc.something.com
Before using IIS Rewrite module, if I access the site from any Zone it works fine.
But once I configure Rewrite module as following-
Match URL Section
Requested URL = Matches the Pattren
Using = Regular Expression
Pattren = (.*)
Conditioins
Logical Grouping = Match All
Condition Input = {HTTPS}
Check if input string = Matches the pattren
Pattren = ^OFF$
Actions
Action Type = Redirect
Redirect URL = https://{HTTP_HOST}/{R:1}
Append Query String = True
Redirect Type = See Other (303)
If I try to access the site on the Web Front Server
i.e. using Default Zone http://sharepoint:46543
the website does not open. Even Central Administration stop opening at this time.
If I try to access Internet Zone http://abc.something.com
then it gets redirected to Custom Zone https://abc.something.com
but it does not open the site. Even if I try to access Custom Zone site by directly entering the URL, it does not open.
What am I doing wrong?
해결책
Here is how I solved this-
- Removed the
IIS Rewrite
rules completely. - In AAM, Default Zone
http://sharepoint:46543
remain same - Click on
Edit Public URLs
, enterhttps://abc.something.com
(HTTPS) in Internet and Click Save. - Click on
Add Internal URLs
and enterhttp://abc.something.com
(only HTTP) andSave
.
Source - http://blog.blksthl.com/2012/12/20/a-guide-to-https-and-secure-sockets-layer-in-sharepoint-2013/