I just need to remove a specific part of any request that matches. See samples below:
Examples:
Old URLs: /learn/videos, /learn/events/event-1, /learn/resources/o365/lesson1
New URLs: /videos, /events/event-1, /resources/o365/lesson1
Do i need 3 seperate rules like below:
<rule name="old-learn-1">
<match url="^learn/([_0-9a-z-]+)"/>
<action type="Rewrite" url="{R:1}"/>
</rule>
<rule name="old-learn-2">
<match url="^learn/([_0-9a-z-]+)/([_0-9a-z-]+)"/>
<action type="Rewrite" url="{R:1}/{R:2}"/>
</rule>
<rule name="old-learn-3">
<match url="^learn/([_0-9a-z-]+)/([_0-9a-z-]+)/([_0-9a-z-]+)"/>
<action type="Rewrite" url="{R:1}/{R:2}/{R:3}"/>
</rule>
Or can it be done with 1 rule?
Any piece of advise or information would be highly appreciated.