title: symfony 4 public files not accesible
body: <p>When deploying to test server I cannot access anything in the public folder. I get the Symfony Route error. As if it doesn't recognize the public folder. All pages route correctly. My dev environment is the following c:\inetpub\wwroot\userdir\symfony-test
  Which translates to this url. <a href="https://servername/userdir/symfony-test/test" rel="nofollow noreferrer">https://servername/userdir/symfony-test/test</a></p>
  
  <p>Trying to pull up the test image below or the css or js files in twig I get a 404 error </p>
  
  <pre><code> &lt;img src="{{  asset('build/images/test.jpg')   }}"  alt="test"&gt;
  </code></pre>
  
  <p>Seeing that it was not getting the full path I changed the framwork.yaml to set the base_urls which gives the full path and I set the json manifest_path. While the manifest path is correct and I can see that it gives the full path on using base_urls I still get a 404 for anything in the public folder. </p>
  
  <pre><code>assets:
      json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
      base_urls:
        - 'https://servername/userdir/symfony-test/public/'
  </code></pre>
  
  <p>Doing the above resulted in</p>
  
  <pre><code>GET https://servername/userdir/symfony-test/build/images/test.93d146a7.jpg 404 (Not Found)
  </code></pre>
  
  <p>I also updated the composer.json file as below to add the public-dir under "extra" following the link instructions here. <a href="https://symfony.com/doc/current/configuration/override_dir_structure.html" rel="nofollow noreferrer">https://symfony.com/doc/current/configuration/override_dir_structure.html</a></p>
  
  <pre><code> "extra": {
      "symfony": {
          "allow-contrib": false,
          "require": "4.2.*",
          "public-dir": "userdir/symfony-test/public/"
      }
  </code></pre>
  
  <p>Files are compiled using encore webpack and works as expected. </p>
  
  <p><code>Encore
      // directory where compiled assets will be stored
      .setOutputPath('public/build/')
      .enableVersioning()
      // public path used by the web server to access the output path
      .setPublicPath('/build')
      .addEntry('app', './assets/js/app.js')
      .addEntry('test','./assets/images/test.jpg')
  </code>
  This might be helpful information too.
  Here is the rule in the /public/web.config file.</p>
  
  <pre><code>&lt;rule name="Imported Rule 1" stopProcessing="true"&gt;
            &lt;match url="^(.*)$" ignoreCase="false" /&gt;
            &lt;conditions logicalGrouping="MatchAll"&gt;
              &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /&gt;
            &lt;/conditions&gt;
            &lt;action type="Rewrite" url="index.php" appendQueryString="true" /&gt;
          &lt;/rule&gt;
  </code></pre>
  
  <p>Rule in symfony-test/web.config</p>
  
  <pre><code>&lt;rewrite&gt;
        &lt;rules&gt;
           &lt;rule name="Symfony4" stopProcessing="true"&gt;
             &lt;match url="(.*)" ignoreCase="false" /&gt;
             &lt;action type="Rewrite" url="public/" appendQueryString="true" /&gt;
           &lt;/rule&gt;
        &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>
  
  <p>Running Symfony 4 on IIS Windows Server 2012 R2.
  Php 7.2.13,<br>
  Composer version 1.6.5, 
  node version 8.11.4, 
  yarn 1.9.4</p>
  
  <p>How can I get the public folder to be recognized and not considered a route or receive a 404.</p>