Nginx. Rewrite to static file. Not trivial
<p>actually my first question on stackoverflow, because case is not so easy.
I want nginx to rewrite all requests to static file appending requested url, and i achieved this easily with this rule</p>

<pre><code>location / {
            index index.html;
            try_files $uri @rewriteapp;
        }

        location @rewriteapp {
           rewrite ^(.*)$ /index.html#!$1 break;
}
</code></pre>

<p>BUT this is resulting in 404 and in log i see exactly how this should work, but it isn't.</p>

<pre><code>2016/11/21 11:53:33 [error] 5220#6856: *1 "C:/Projects/ProCongress/web/index.html#!/index.html" is not found (3: The system cannot find the path specified), client: 127.0.0.1, server: congress, request: "GET / HTTP/1.1", host: "congress"
</code></pre>

<p>web/index.html#!/index.html - this part is acutally absolultley right, and should work correctly, but isn't...</p>