Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

IIS url rewrite rule for web application

Posted on 2016-07-27
3
Medium Priority
?
76 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Assisted Solution

by:Ryan Chong
Ryan Chong earned 2000 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 53

Accepted Solution

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

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

730 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