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>
WiggingAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

edster9999Commented:
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.
0
WiggingAuthor Commented:
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
0
MAS (MVE)EE Solution Guide - Technical Dept HeadCommented:
Please check this. This is for exchange but it is similar in IIS7
http://support.microsoft.com/kb/975341
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WiggingAuthor Commented:
I am trying and it goes in a loop it says
0
WiggingAuthor Commented:
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})
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Internet Protocols

From novice to tech pro — start learning today.