How To: Redirect the Default IIS Site to a Realm

Follow
    Applies to:
  • SecureAuth Identity Platform
Deployment model:
  • Hybrid
  • On Premises
  • Version Affected: All

     

    Overview

    This article explains how to configure the Default Web Site in IIS to redirect to a specific realm — for example, the Secure Portal realm — when a customer requests this.

    • Use Method 1 to redirect using the IIS URL Rewrite module. This is the more flexible option — it supports a permanent redirect and can be scoped to a specific hostname.
    • Use Method 2 to redirect by editing the default index.html page directly.
       

    In this article

     

    Method 1: Using the IIS URL Rewrite Module

    Use this method if the IIS URL Rewrite module is installed.

    1. In IIS Manager, select Sites > Default Web Site.
    2. Open URL Rewrite, and create a new inbound rule.
    3. Under Match URL, set Requested URL to Matches the Pattern, Using to Regular Expressions, and Pattern to .* (matching any request). Check Ignore case.
      The Edit Inbound Rule page with Requested URL set to Matches the Pattern, Pattern set to .*, and a condition on HTTP_HOST.
    4. Under Conditions, set Logical grouping to Match Any, and add a condition: Input {HTTP_HOST}, Type Matches the Pattern, Pattern ^<hostname>\.<customerdomain>\.com$ — replacing the pattern with the hostname the redirect should apply to.
    5. Under Action, set Action type to Redirect, Redirect URL to the target realm's URL (for example, https://idp.customerdomain.com/secureauth22), check Append query string, and set Redirect type to Permanent (301).
      The Edit Inbound Rule page with Action type set to Redirect, Redirect URL set to the target realm, Append query string checked, and Redirect type set to Permanent (301).
    6. Apply the rule, then test by browsing to the customer's URL.

     

    Method 2: Editing the Default index.html Page

    Use this method if the IIS URL Rewrite module is not installed.

    1. Back up the existing index.html file, located at D:\inetpub\wwwroot\.
    2. Edit index.html to redirect to the target realm, for example:
      <html>
      <head>
      <title></title>
      <meta http-equiv="refresh" content="0;URL=https://idp.customerdomain.com/secureauth#/">
      </head>
      <body>
      </body>
      </html>
    3. In IIS Manager, select Sites > Default Web Site.
    4. In the center pane, double-click Default Document.
    5. Move index.html to the top of the list.
      The IIS Manager Default Document page with index.html moved to the top of the list.
    6. Test by browsing to the customer's URL.



     

    SecureAuth Knowledge Base Articles provide information based on specific use cases and may not apply to all appliances or configurations. Be advised that these instructions could cause harm to the environment if not followed correctly or if they do not apply to the current use case.

    Customers are responsible for their own due diligence prior to utilizing this information and agree that SecureAuth is not liable for any issues caused by misconfiguration directly or indirectly related to SecureAuth products.

    0 out of 0 found this helpful

    Comments

    0 comments

    Please sign in to leave a comment.