Welcome! Log In Create A New Profile

Advanced

Re: error_page

Francis Daly
March 28, 2011 01:58PM
On Mon, Mar 28, 2011 at 11:16:00PM +1100, SplitIce wrote:

Hi there,

> I just noticed that the error_page directive strips post data... I thought a
> patch was submitted for this years ago?

As currently implemented, if the error_page value starts with a /,
then the internal request for it is a GET (or HEAD).

The post_data is provided as part of the request, but the receiving side
probably won't do much useful with it.

If the error_page value starts with a @, the internal request matches
the original one.

(Any other error_page value results no internal request, which is
probably not what you want.)

> Any chance of getting this patched? Us people using dynamic sites where we
> use internal redirects like: /index.php?page=$uri
> would apreciate it.

As per http://wiki.nginx.org/HttpCoreModule#error_page, you might find
that something like

error_page 404 = @index;
location @index {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_pass unix:php.sock;
}

does, or can be adapted to do, what you want. But test all the cases
you care about before deploying ;-)

Good luck with it,

f
--
Francis Daly francis@daoine.org

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

error_page

SplitIce March 28, 2011 08:18AM

Re: error_page

Ensiferous March 28, 2011 10:58AM

Re: error_page

Francis Daly March 28, 2011 01:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
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