Skip to main content

IIS configuration

To configure IIS, you need to have an admin access to server using Remote Desktop. You need to ensure these two modules are installed to your Windows server:

If you have difficulties installing these modules, follow this guide

Step 1 - Enable Reverse Proxy

  1. Launch IIS Manager
  2. Enter Application Requests Routing Cache section Application Requests Routing Cache
  3. Press "Server Proxy Settings" Server Proxy Settings
  4. Make sure Enable proxy is checked and Apply changes Enable proxy

Step 2 - Configure requests proxying

Update your web.config and ingest the highlighted rule in the appropriate place

web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ContimoAdvertorial" stopProcessing="true">
<match url="^VIRTUAL_FOLDER/(.*)" />
<action type="Rewrite" url="https://advertorials.contimo.app/websites/WEBSITE_ID/{R:1}" logRewrittenUrl="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Example:

web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ContimoAdvertorial" stopProcessing="true">
<match url="^advertorials/(.*)" />
<action type="Rewrite" url="https://advertorials.contimo.app/websites/6489821d2f9f02bd60f06f56/{R:1}" logRewrittenUrl="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>