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

x
?
Solved

HTTPS Redirect in IIS - exclude a site

Posted on 2014-11-18
4
Medium Priority
?
421 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 668 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 664 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 668 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

722 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