Solved

HTTPS Redirect in IIS - exclude a site

Posted on 2014-11-18
4
326 Views
Last Modified: 2014-11-18
I have a few sites housed on a server 2008 server.  I set up a HTTPSRedirect site to redirect everything from http to https, minus two sites.  Everything works great.

I'm trying to add one more site; however, it is doing the redirect to the https from http, and I can't for the life of me figure out how I excluded sites in the past from this redirect.

What additional info do you need?
0
Comment
Question by:dzirkelb
4 Comments
 
LVL 32

Assisted Solution

by:Big Monty
Big Monty earned 167 total points
ID: 40450616
i think you can do something like the following. Be sure to put it first so it executes before your working rule already in place

<rule name="block" stopProcessing="true">
    <match url="^www.siteToExclude.com$" />
    <action type="None" />
</rule>

Open in new window


also, here's a good reference to help you understand url rewiting better:

http://www.iis.net/learn/extensions/url-rewrite-module/url-rewrite-module-configuration-reference
0
 
LVL 40

Assisted Solution

by:Kyle Abrahams
Kyle Abrahams earned 166 total points
ID: 40450644
there's usually an IIS rewrite URL in the site.

IIS Screenshot
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 167 total points
ID: 40450796
You said, "I set up a HTTPSRedirect site to redirect everything from http to https, minus two sites."

I hope I am reading this wrong, are you saying you set up one site that does all the redirection for multiple sites?  

How are you currently redirecting now?  
Are you using something like
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","https://www.mysite.com.coml"

Open in new window

or
If Request.ServerVariables("SERVER_PORT")=80 Then
      Dim strSecureURL
      strSecureURL = "https://"
      strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")
      strSecureURL = strSecureURL & Request.ServerVariables("URL")
      Response.Redirect strSecureURL
   End If

Open in new window

or
response.redirect "https://mysite.com"

Open in new window

or are you using a web.config file you created by hand or via iis?
0
 

Author Comment

by:dzirkelb
ID: 40450811
I'm using the middle option, and a hand written web.config file.

This sever houses all internal applications, nothing external.  We however wanted to put a ssl cert on it, so instead of just changing everyone's favorites and all our ice aged web pages that had bad, hard coded web addresses, I put a redirect from http to https instead.

Somehow, it is working now, I think my settings / changes just weren't taking before.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now