Solved

IIS url rewrite rule for web application

Posted on 2016-07-27
3
62 Views
Last Modified: 2016-07-30
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
Comment
Question by:yadavdep
  • 2
3 Comments
 
LVL 51

Assisted Solution

by:Ryan Chong
Ryan Chong earned 500 total points
ID: 41730949
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
 

Author Comment

by:yadavdep
ID: 41731122
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
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 41732389
so you only wanted "/MyWebapplication" to be redirected from HTTP to HTTPS?
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question