Link to home
Start Free TrialLog in
Avatar of Wigging
WiggingFlag for United States of America

asked on

iis redirect from http to https


This code below is very close but my website is inside a sub folder......that subfolder is an app in iis7

Domain is  http:// www.mydomain.com/chat

I want to always redirect to https://www.mydomain.com/chat

<rule name="Redirect to HTTPS" stopProcessing="true">  
  <match url="(.*)" />  
  <conditions>  
    <add input="{HTTPS}" pattern="^OFF$" />  
  </conditions>  
  <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />  
</rule>
Avatar of edster9999
edster9999
Flag of Ireland image

Add 2 web servers into the setup in IIS.
List one on port 80 (the normal web one) and one on port 443 (the SSL one).
The SSL one is the full web site.
the port 80 one has the redirect.  You can do it in the GUI without writing rules.
Avatar of Wigging

ASKER

we already have https installed in the server.....
all i need is that when people come to    domain.com/chat       they get redirected to   https://www.domain.com/chat

Just for security issues
ASKER CERTIFIED SOLUTION
Avatar of M A
M A
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Wigging

ASKER

I am trying and it goes in a loop it says
Avatar of Wigging

ASKER

when using this in url rewrite
  <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />

my site is going from  
www.site.com/chat     to    https://www.site.com/

How can I add the folder chat?  ({HTTP_HOST}/{R:1})