All right. We'll use $scheme://$host/error.html in http block, because we<div>have lots of server blocks in the deploy. Thanks.<br><br><div class="gmail_quote">2013/1/11 Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<div class="im"><br>
On Thu, Jan 10, 2013 at 11:57:58PM +0800, lanshun zhou wrote:<br>
<br>
> Yeah, this will break current supported configs like the one you provided.<br>
> But only<br>
> the ones with 30x response code overwritten and without named location are<br>
> affected. I think =30x in error_page is something like the "redirect" flag<br>
> in "rewrite",<br>
> which means "I want the redirect" by default.<br>
<br>
</div>No, =NNN means "I want NNN code to be returned", nothing more. It<br>
allows to overwrite code returned if redirect is requested (via<br>
something like "http://..." set in uri parameter), but it doesn't<br>
request redirect by itself.<br>
<div class="im"><br>
> I could think of these kinds of configs broken before the patch, and<br>
> just not sure<br>
> why introducing a location for 30x response. Is the content<br>
> for 30x response<br>
> valuable? or to generate the "Location" header dynamically which can not be<br>
> expressed by the url param with variables supported?<br>
<br>
</div>Some time ago returning correct content (more specifically,<br>
correct type of content) in redirections was required for WAP<br>
phones to handle them.<br>
<div class="im"><br>
> But this patch does break supported configs, although named locations<br>
> can be used<br>
> instead as before to do anything. I just don't l like introducing a<br>
> location to redirect<br>
> for 404 error_page :)<br>
><br>
> error_page 404 @notfound;<br>
><br>
> location @notfound {<br>
> return 302 /error.html; # or rewrite ^ /error.html redirect;<br>
> }<br>
<br>
</div>Use something like this instead:<br>
<br>
error_page 404 <a href="http://example.com/error.html" target="_blank">http://example.com/error.html</a>;<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.com/support.html" target="_blank">http://nginx.com/support.html</a><br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</div></div></blockquote></div><br></div>