PHP: How can I get domain.com/index.php/blah/ to work?
Igor Sysoev
is at rambler-co.ru
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 domain.com/index.php/blah/blah/ - 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
http://sysoev.ru/en/
More information about the nginx
mailing list