Microsoft IIS

Setting up Traffic Splitting with Microsoft IIS

Dependencies

Using IIS with Glopals Traffic Splitting, you’ll need first to install both Application Request Routing and URL Rewrite if they’re not already installed. These packages will enable you to forward traffic to Glopal selectively.

Required Packages

Activate Application Request Routing

  1. Open the IIS Manager console and navigate to the level you want to manage.

  2. In Features View, double-click ‘Application Request Routing Cache’.

  3. In the Actions pane, click ‘Server Proxy Settings’.

  4. On the Application Request Routing page, select the ‘Enable proxy’ check box.

  5. In the Actions pane, click ‘Apply’.

Create a rule

With all the dependencies in place we can move forward to setting them up correctly and inputting the rewrite rules.

Launch IIS Manager and Select Your Site

Open the Internet Information Services (IIS) Manager on your server.

In the Connections pane on the left, navigate to and select the site where you want to create the URL rewrite rule.

Access URL Rewrite

Once you have selected your site, find and double-click on the "URL Rewrite" feature in the central pane to open it.

Create a New Rule

In the Actions pane on the far right, click on "Add Rule(s)..." to open the "Add Rule" dialogue box.

Under the "Inbound rules" section in the dialogue that appears, click on the "Blank rule" option to create a new rule from scratch.

Setup Match URL

In the "Edit Inbound Rule" dialogue box that opens, enter a name for your rule in the "Name" field to easily identify it later.

In the "Match URL" section, perform the following actions:

  1. Requested URL: Set this to "Matches the Pattern".

  2. Using: Set this to "Regular Expressions".

  3. Pattern: Enter regular expression in the format ^/(PATTERN)($|[:/?]) where PATTERN is a placeholder describing list of in-scope paths you want to delegate to Glopal, for example: ^/(de/eur|fr/eur)($|[:/?]).

Setup Conditions

In the "Conditions" section, you can add specific conditions if necessary. If you don't have any conditions to add, you can leave this section as is.

Setup Action Settings

In the "Action" section, configure the following settings:

  • Action Type: Set this to "Rewrite".

  • Rewrite URL: Enter https://GLOPAL_HOSTNAME{R:0} replacing the GLOPAL_HOSTNAME placeholder with the value you receive from Glopal, for example store-1234.app.glopalstore.com.

  • Append Query String: Ensure this option is checked to include the query string in the rewritten URL.

  • Stop Processing of Subsequent Rules: Set this to "Yes" to prevent other rules from being applied after this one.

Save the Rule

Click "Apply" in the Actions pane on the right to save and activate your new rule.

Testing your rule

To ensure the rule works as expected, conduct a series of tests by visiting URLs that should be affected by the rule and confirming that they are rewritten correctly.

That's it! You have now created a URL rewrite rule in IIS.

Last updated