Redirect rule in web.config
I looked into this Seems like a simple redirect in IIS using the web.config file because I have a similar situation, but the approach mentioned there doesn't seem to work for me.
I have a help section on a website that I want to redirect to a different location right now. The rest of the site should remain unchanged, which means that only the help / content section should force the user to navigate to another site:
device.domain.com/help
device.domain.com/help/version
Must make a request to
company.custhelp.com
But for example device.domain.com/api should work. This is what I have tried. If I test the template inside IIS it says it will work. What am I missing?
<system.webServer>
<rewrite>
<rules>
<rule name="Help Redirect" stopProcessing="true">
<match url="(.*)/help(.*)" ignoreCase="true" />
<action type="Redirect" url="http://company.custhelp.com/" appendQueryString="false" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
...
</system.webServer>
+3
source to share
1 answer