Subscribe to PortalGuard's Quarterly Newsletter for News & Updates on the Latest Release! Click to Subscribe

How to Enable the PortalGuard Rewrite Rules


Problem

You need to enable the PortalGuard rewrite rules for either SSO or HTTP/HTTPS redirection.

Solution

Install the URL Rewrite Module for IIS and uncomment the pre-existing rewrite rules for PortalGuard.

Quick Navigation

How to Enable the PortalGuard Rewrite Rules in IIS

  1.  On the PortalGuard server, determine whether URL Rewrite has already been installed:
    • Open the IIS Manager
    • Expand the left hand column down to 'sites -> PortalGuard'
    • Click directly on the ‘PortalGuard’ site and check the center of the window to determine if the URL Rewrite module exists.  If it does, you should see the following:
    • If the URL Rewrite module is not installed, follow steps #2-5 below to install it.
  2. Navigate to https://www.iis.net/downloads/microsoft/url-rewrite
  3. Click on the 'additional downloads' link beneath the large green 'Install this extension' button:
  4. Click on the 'x64' link to download the 64-bit .msi installer:
  5. Once the download completes, run the .msi installer and follow the on-screen instructions to install the URL Rewrite Module for IIS.
    • To confirm that the URL Rewrite Module has installed, repeat step #1 above
    • NOTE: You may need to close the IIS Manager and reopen it to see the new module in place. 

Enable the Pre-existing Rewrite Rules in PortalGuard

  1.  On the PortalGuard server, edit the following file in an administrative text editor (e.g. Notepad++):
    • C:\inetpub\PortalGuard\web.config
  2. Search the file for '<rewrite>' (without the quotes).
  3. Remove the opening comment characters (<!–) from before the module.
  4. Your end-result should resemble the following:
  5. Navigate to the end of the </rewrite> module and remove the closing comment characters (–>) from after the module. 
  6. Your end-result should resemble the following:
  7. Save the changes to the web.config file. 
  8. Open an elevated CMD and run the 'iisreset' command (without the quotes).
  9. Navigate to IIS and open the URL Rewrite module within the PortalGuard site to view the existing Rewrite rules
      • From here you may disable any necessary rules without needing to modify the web.config file again.
      • Please note that the HTTPS Redirect rewrite rule requires the Port 80 binding to exist on the PortalGuard website.  

REV. 01/2019 | PortalGuard

  • 83
  • 17-Jan-2019
  • 303 Views