Solved

HTTPS Redirect in IIS - exclude a site

Posted on 2014-11-18
4
340 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 33

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
Imagine a situation that you have installed SSL (http://en.wikipedia.org/wiki/Secure_Sockets_Layer) Certificate on your Cisco ASA (Cisco Adaptive Security Appliance) firewall. Installation of SSL certificate on ASA is an another topic for which you …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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