title: how can i served same location from many location in nginx?
body: <p>my nginx version : 1.17.3</p>
  
  <p>I want served same template from many url my site in nginx</p>
  
  <p>for example-</p>
  
  <pre><code>localhost:0000/adprofit
  localhost:0000/adprofit/0
  localhost:0000/adprofit/0/2
  localhost:0000/adprofit/asdlk/asd/asd
  localhost:0000/adprofit/sand/12312/asd/?AS?Dsa
  </code></pre>
  
  <p>in any case if i catch same keyword like 'adprofit'.
  my site user must be served 'adprofit.html' template.
  BUT, NO REWRITE, NO REDIRECT.
  i want keep user request url.</p>
  
  <p>My directory: </p>
  
  <pre><code>build
  |
  |-index.html
  |-index.js
  |-adprofit
  |   |
  |   |-adprofit.js
  |   |-adprofit.html
  |
  |-another directories...
  </code></pre>
  
  <p>I succeed served from diffrent url used 'alias'.</p>
  
  <pre><code>location /all {
       allow all;
       alias ./build/adprofit;
       index adprofit.html;
  }
  </code></pre>
  
  <p>in this case keep url <code>localhost:0000/all/</code> and view template <code>adprofit.html</code>.</p>
  
  <p>and this case too.</p>
  
  <p>Code:</p>
  
  <pre><code>location /adprofit/all {
       allow all;
       alias ./build/adprofit;
       index adprofit.html;
  }
  url : 'localhost:0000/adprofit/all/'
  </code></pre>
  
  <p>my nginx code:</p>
  
  <pre><code>server {
       listen       8888;
       server_name  192.168.0.25;
       add_header 'Access-Control-Allow-Origin' '*';
       access_log  logs/host.access.log  main;
  
       location / {
        allow all;
        root ./build;
        index  index.html;
        }
  
   location /adprofit {
    allow all;
    alias ./build/adprofit;
    index adprofit.html;
   }
  }
  </code></pre>
  
  <p>my try case:</p>
  
  <pre><code>location /adprofit/ {
       allow all;
       alias ./build/adprofit;
       index adprofit.html;
  }
  succeed url : 'localhost:0000/adprofit/'
  failed url : 'localhost:0000/adprofit/[anykeyword]' =&gt; 404 error page
  
  code2)
  location ~*/adprofit/(all|update|event) {
       allow all;
       alias ./build/adprofit;
       index adprofit.html;
  }
  succeed url : 'localhost:0000/adprofit/'
  failed url : 'localhost:0000/adprofit/all and update and event' =&gt; 403 Forbidden
  </code></pre>
  
  <p>how can i resolve this situation?</p>