title: IIS URL Rewrite Rule Ignored when Path is Part of Virtual Directory
body: <p>I'm attempting to create a URL rewrite rule in IIS that redirects a user to a new web page. The path for the rule is a deleted PDF file that was contained in a virtual directory. I have this rule working on an existing site, but on our new/updated website using .Net core - the rule does not work (returns a 404 status code). The virtual directory setup is the same - /pdf. It appears that the rule is completely ignored if it is a virtual directory.</p>
  <pre><code>Website
  │   New_Web_Page
  └───pdf (virtual directory)
  │   │   A_PDF_File.pdf
  </code></pre>
  <pre class="lang-xml prettyprint-override"><code>&lt;rule name=&quot;PDF Redirect Rule&quot; stopProcessing=&quot;true&quot;&gt;
    &lt;match url=&quot;pdf/A_PDF_File.pdf&quot; /&gt;
    &lt;action type=&quot;Redirect&quot; url=&quot;New_Web_Page&quot; redirectType=&quot;Permanent&quot;  /&gt;
  &lt;/rule&gt;
  </code></pre>