title: IIS URL Rewrite remove part of path
body: <p>After researching url rewrite and reviewing many posts, I'm still stumped as to why my url rewrite is not working. I am attempting to remove <code>/carrot/</code> from the path.</p>
  
  <p>Ex: <code>https://my.server.com/carrot/mobile/path</code></p>
  
  <p>should become: <code>https://my.server.com/mobile/path</code></p>
  
  <p>My URL rewrite rule is pretty simple and looks as follows:</p>
  
  <pre><code>    &lt;rule name="RemoveCarrotFromPath"&gt;
        &lt;match url=".*carrot(.*)" /&gt;
        &lt;action type="Rewrite" url="{R:1}" /&gt;
      &lt;/rule&gt;
  </code></pre>
  
  <p>All help is appreciated.</p>
  
  <p><strong>Edit</strong> Below you can find all rules in use in case this is an issue where various rules are clashing:</p>
  
  <pre><code>&lt;rewrite&gt;
    &lt;rules&gt;
      &lt;rule name="redirectPayment" stopProcessing="true"&gt;
        &lt;match url="/payment" /&gt;
        &lt;action type="Redirect" url="https://my.app.com/carrot/Payment" /&gt;
      &lt;/rule&gt;
      &lt;rule name="redirectMembership" stopProcessing="true"&gt;
        &lt;match url="/membership" /&gt;
        &lt;action type="Redirect" url="https://my.app.com/carrot/Membership" /&gt;
      &lt;/rule&gt;
      &lt;rule name="RemoveCarrotFromPath"&gt;
        &lt;match url=".*carrot(.*)" /&gt;
        &lt;action type="Rewrite" url="{R:1}" /&gt;
      &lt;/rule&gt;
    &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>