PHP: How can I get to work?

Igor Sysoev is at
Sat Jul 21 12:00:44 MSD 2007

On Sat, Jul 21, 2007 at 02:16:21AM +0000, Rob wrote:

> I understand how to get regular .php files to work, but my PHP framework only
> works by going to - notice the / after index.php
> and not index.php?blah=. I can't seem to get this to work in nginx, as it sees
> /index.php/blah/blah/ as directories and not just index.php with variables. Can
> anyone help me?

Do you use FastCGI ?

   location \.php(/|$) {

       set  $script_name  $uri;
       set  $path_info    "";

       if ($uri ~ ^(.+\.php)(/.+)) {
           set  $script_name  $1;
           set  $path_info    $2;

       fastcgi_pass   ...

       fastcgi_param  SCRIPT_FILENAME  /path/to/$script_name;
       fastcgi_param  PATH_INFO        $path_info;

Igor Sysoev

More information about the nginx mailing list