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
Subject Author Posted

error_page can not work in if directive

xinghua_hi December 25, 2012 08:06AM

Re: error_page can not work in if directive

xinghua_hi December 25, 2012 09:36AM

Re: error_page can not work in if directive

Maxim Dounin December 25, 2012 09:44AM

Re: error_page can not work in if directive

xinghua_hi December 25, 2012 10:09AM

Re: error_page can not work in if directive

Maxim Dounin December 25, 2012 10:28AM

Re: error_page can not work in if directive

xinghua_hi December 25, 2012 11:47AM

Re: error_page can not work in if directive

Maxim Dounin December 25, 2012 12:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
Record Number of Users: 7 on May 23, 2016
Record Number of Guests: 238 on March 17, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready