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