How to redirect all request to same file in nginx?
<p>My root directory</p>

<p>/web/app/src</p>

<p>In this directory I have 2 directories /js/ and /assets/
and one file index.html</p>

<p>This is what I need to achieve:</p>

<p>Any request to /js/ or /assets/ or /index.html just serve files from root directory
For example myapp.com/js/app.js servers app.js from /web/app/src/js/ directory
Same with requests to /assets/</p>

<p>But all other requests, any other uri should result in serving index.html</p>

<p>For example</p>

<p>myapp.com/bla/bla/q?param=x
Should serve index.html from web root directory</p>

<p>All rewrites should be internal, no http 301 redirects.</p>