I have website (ASP MVC, hosted on IIS) old pages that I want to redirect but for some reason I don't get it right. I tried with IIS rewrite and with web.config too.
For example I have old page called https://www.tanalyzer.com/Home/FAQ and I want to redirect it to https://www.tanalyzer.com/faq
What I have in web.config is
<rule name="Rewrite rule1 for urls-old-to-new">
<match url=".*" />
<conditions>
<add input="{urls-old-to-new:{REQUEST_URI}}" pattern="(.+)" />
</conditions>
<action type="Rewrite" url="{C:1}" appendQueryString="false" />
And for the rewrite map
<rewriteMap name="urls-old-to-new"><add key="/Home/FAQ" value="/faq"></rewriteMap>