Welcome! Log In Create A New Profile

Advanced

error_page can not work in if directive

December 25, 2012 08:06AM
I want to display different pages when 413 code return, for example

set $var 1;
if ($var = 1) {
error_page 413 /413_old.html;
}
if ($var =2) {
error_page 413 /413_new.html;
}

error_page can not work, but I write error_page directive in location block directly instead of using if directive, it can work normally
SubjectAuthorPosted

error_page can not work in if directive

xinghua_hiDecember 25, 2012 08:06AM

Re: error_page can not work in if directive

xinghua_hiDecember 25, 2012 09:36AM

Re: error_page can not work in if directive

Maxim DouninDecember 25, 2012 09:44AM

Re: error_page can not work in if directive

xinghua_hiDecember 25, 2012 10:09AM

Re: error_page can not work in if directive

Maxim DouninDecember 25, 2012 10:28AM

Re: error_page can not work in if directive

xinghua_hiDecember 25, 2012 11:47AM

Re: error_page can not work in if directive

Maxim DouninDecember 25, 2012 12:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready