Solved

HTTPS Redirect in IIS - exclude a site

Posted on 2014-11-18
4
392 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
[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
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 53

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

635 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