Welcome! Log In Create A New Profile

Advanced

Re: php and urls with /?xxx

Francis Daly
November 19, 2011 10:48AM
On Fri, Nov 18, 2011 at 06:31:51PM -0500, Salem wrote:

Hi there,

> For Wordpress-Urls like /index.php/xxx/
> try_files $uri $uri/ /index.php?q=$request_uri;
> works fine, but for /?

The "location" goes from the / to just before the first ? or #.

You want this to be handled as if it were /index.php?xxx=xxx. So do
just that.

location = / {
fastcgi_pass unix:php.sock;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME /htdocs/index.php;
}

The SCRIPT_FILENAME would normally be $document_root/index.php, but you
mention elsewhere that chroot is used. SCRIPT_FILENAME is "the name of
the file the php interpreter should load, from its perspective".

(If you did fastcgi_pass to a different server, the filename on
that server would be what you would send. Which may be unrelated to
$document_root.)


Maybe just adding

index index.php;

within the server{} block instead, would be sufficient.

Good luck with it,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

php and urls with /?xxx

Salem November 18, 2011 06:31PM

Re: php and urls with /?xxx

António P. P. Almeida November 18, 2011 08:40PM

Re: php and urls with /?xxx

Salem November 18, 2011 10:04PM

Re: php and urls with /?xxx

Edho Arief November 18, 2011 10:12PM

Re: php and urls with /?xxx

Edho Arief November 18, 2011 10:16PM

Re: php and urls with /?xxx

Salem November 19, 2011 08:56AM

Re: php and urls with /?xxx

Francis Daly November 19, 2011 10:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready