https to https redirection using isapi or coldfusion

Posted on 2010-01-06
Last Modified: 2013-12-24
Using an isapi rewrite (I'm using helicon 2) or on a coldfusion page, how would I redirect an https url to another https url?
Question by:COwebmaster
    LVL 15

    Accepted Solution

    Have you tried just using the redirect option within IIS?  Properties-->Home Directory-->A Redirection to a URL

    Author Comment

    haven't tried that yet.  which is the best solution to use?

    Will the following isapi redirect work?

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^online.domain\.com$ [NC]
    RewriteRule ^(.*)$$1 [R=301,L]

    Author Comment

    The problem is google has indexed (not sure why).  An ssl cert does not exist for that domain. however, another domain I own and have a ssl cert assigned to exists for which points to the same file directory as where points to.  I can't simply do a redirection because it would cause an endless loop.
    LVL 3

    Assisted Solution

    <cfif cgi.server_name eq "onlinedomain">
      <cflocation url="https://newdomain/#cgi.query_string#" />

    This should work properly if you include it in your main file, before all code.

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
    The viewer will learn how to dynamically set the form action using jQuery.

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now