title: How to send all requests through FastCGI with Nginx
body: <p>Currently, my Nginx server is set up to accept both <code>www.example.com/file</code> and <code>www.example.com/file.php</code> to load <code>file.php</code>. However, because the Nginx setup looks like this:</p>
  
  <pre><code>location ~ \.php$ {
      fastcgi_split_path_info ^(.+\.php)(/.+)$;
  
      // More setup stuff
  }
  </code></pre>
  
  <p>The only way it processes the file as PHP through FastCGI is if the URI ends with <code>.php</code>, otherwise, it will just download the file. How can I set it up so all PHP files get processed through FastCGI, regardless of the URI? (I'm sure this is more secure anyway, so people can't look at my PHP code.)</p>