Last updated
Last updated
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.
Compatible with: IIS 7, IIS 7.5, IIS 8, IIS 8.5, IIS 10
Compatible with: IIS 7, IIS 7.5, IIS 8, IIS 8.5, IIS 10
Open the IIS Manager console and navigate to the level you want to manage.
In Features View, double-click ‘Application Request Routing Cache’.
In the Actions pane, click ‘Server Proxy Settings’.
On the Application Request Routing page, select the ‘Enable proxy’ check box.
In the Actions pane, click ‘Apply’.
With all the dependencies in place we can move forward to setting them up correctly and inputting the rewrite rules.
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.
Once you have selected your site, find and double-click on the "URL Rewrite" feature in the central pane to open it.
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.
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:
Requested URL: Set this to "Matches the Pattern".
Using: Set this to "Regular Expressions".
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.
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.
Click "Apply" in the Actions pane on the right to save and activate your new 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.
Pattern: Enter regular expression in the format ^/(PATTERN)($|[:/?])
where PATTERN
is a placeholder describing you want to delegate to Glopal, for example: ^/(de/eur|fr/eur)($|[:/?])
.
Setting up Traffic Splitting with Microsoft IIS