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
- Launch IIS Manager
- Enter Application Requests Routing Cache section
- Press "Server Proxy Settings"
- Make sure Enable proxy is checked and Apply changes
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>