title: Virtual Path messing up deployment
body: <p>I'm trying to automate a php deployment in azure devops.<br>
  In an existing environment the app service has a virtual path pointing to site\wwwroot\public:
  <a href="https://i.stack.imgur.com/VXY3q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VXY3q.png" alt="enter image description here"></a><br><br></p>
  
  <p>When I deploy, all data is copied to this directory and not, as expected, to site\wwwroot:
  <a href="https://i.stack.imgur.com/WtVgz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WtVgz.png" alt="enter image description here"></a><br><br>
  When I create a new app service (where the default value of virtual path is set to site\wwwroot) everything gets deployed to site\wwwroot:
  <a href="https://i.stack.imgur.com/WTmRt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WTmRt.png" alt="enter image description here"></a><br></p>
  
  <p>So my tests indicate, that the deployment is depending on the settings under <code>Configuration -&gt; Tab 'Path mappings' -&gt; Virtual applications and directories</code>.
  It seems like a bug to me, because wwwroot should always be the root as its name suggest.</p>
  
  <p>If I try to solve this problem by adding a web.config, that does a rewrite it doesn't work, because there are relative dependencies of some sort.</p>
  
  <pre><code>&lt;rule name="reroute to /public" stopProcessing="true"&gt;
      &lt;match url=".*" /&gt;
      &lt;conditions&gt;
          &lt;add input="{PATH_INFO}" pattern="^/public/" negate="true" /&gt;
      &lt;/conditions&gt;
      &lt;action type="Rewrite" url="\public\{R:0}" /&gt;
  &lt;/rule&gt; 
  </code></pre>
  
  <p>I can see the login page, but I can't neither login nor open any other linked page, because php expect requests to happen @domain.com/call, but the rewrite changes those calls to @domain.com/public/call, so they all fail.</p>
  
  <p>So the only solution seems to be to set the virtual path to site\wwwroot\public for the page to work.
  And if I deploy I temporarily change it to site\wwwroot. I don't like this, but it seems to be the cleanest solution.</p>