title: How to serve static file from dynamic url using nginx
body: <p>i am trying to serve static file from dynamic url</p>
  
  <p>For example serve <code>onefile.pdf</code> file to every dynamic url started <code>/ajax/pdf?dyanamic</code></p>
  
  <p><strong>dynamic url</strong></p>
  
  <blockquote>
    <p>/ajax/pdf?id=5845584&amp;pdfid=19606554&amp;_=1527413953472</p>
  </blockquote>
  
  <p>i am trying to serve /home/jems/onefile.pdf  file to above dynamic url</p>
  
  <p>my nginx config</p>
  
  <pre><code>    if ($request_uri ~* (pdf)) {
              internal /home/jems/onefile.pdf;
      }
  </code></pre>
  
  <p>but its not working</p>