0.7.61: error_page 404 woes
is at rambler-co.ru
Mon Jul 13 22:22:25 MSD 2009
On Mon, Jul 13, 2009 at 07:04:09PM +0200, Toni Mueller wrote:
> I'm having a problem with the error_page directive.
> What I want is to redirect people who try to access a nonexistent page
> to the home page of the site. Following
> http://wiki.nginx.org/NginxHttpCoreModule#error_page , I configured
> error_page 404 /;
> But this statement had no effect. I had to re-write the statement as
> error_page 404 http://$server_name/;
> to get the desired effect, but don't quite understand, why.
Because the first statement does an internal redirect to /,
while the second one does an external redirect (302).
More information about the nginx