All,
I have spent almost a day trying to figure this out. I am helpless now after all the searches and want to reach out to the community.
I want to redirect any traffic on my website based on the following rule
https://www.test.com/abc -> https://www.test.com/test1.aspx?c=abc
https://www.test.com/def -> https://www.test.com/test1.aspx?c=def
The subfolder needs to be passed as a query string
I have tried this and it does not seem to work.
<rule name="Reditect1" stopProcessing="true">
<match url="^(.*)test.com/(.*)" />
<conditions>
<add input="{R:2}" pattern="^[a-zA-Z0-9_]*$" />
</conditions>
<action type="Redirect" url="/test.aspx?c={C:0}" appendQueryString="true" />
</rule>
Any help is highly appreciated