"error_page"& "return" bug?

Nginx User nginx at nginxuser.net
Sun Feb 19 15:09:16 UTC 2012


On 19 February 2012 18:06, Nginx User <nginx at nginxuser.net> wrote:
> This is what actually works:

Small amendment:

Server {
	error_page 503 /error_docs/custom503.html;
	if ( $request_uri !~ \.(gif|png|css|js)$ ) {
		set $m  "T";
	}
	if ( $request_uri !~ ^/maintenance/$ ) {
    	set $maint  "${maint}T";
	}
	if ( $maint = TT ) {
		rewrite ^ /maintenance/ redirect;
	}
	location /maintenance {
		internal;
		return 503;
	}
	location /error_docs {
		internal;
		alias /server/path/to/error_docs/folder;
	}
}



More information about the nginx mailing list