Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 93
  • Last Modified:

IIS url rewrite rule for web application

Under my IIS and under website I have multiple web application hosted.
I need to apply an SSL certificate on my Website but I need to keep all my web application to keep running on HTTP which are under my website except only one.
I need to write a url redirect rule for this web application so that all the http://xxx.com/MyWebapplication can be redirected to https://xxx.com/MyWebapplication.

I tried the writing the matching pattern but did not get any success.
0
yadavdep
Asked:
yadavdep
  • 2
2 Solutions
 
Ryan ChongCommented:
you may try this:
<rule name="Redirect to HTTPS" enabled="true" stopProcessing="true">  
			<match url="(.*)" /> 
			<conditions>  
				<add input="{HTTPS}" pattern="^OFF$" />  
			</conditions>  
			<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />  
	   	</rule>

Open in new window

0
 
yadavdepAuthor Commented:
This would be for me website or webapplication?
Because If I do it for my WebSite then I will enable SSL for all my Web applications
0
 
Ryan ChongCommented:
so you only wanted "/MyWebapplication" to be redirected from HTTP to HTTPS?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now