0.7.61: error_page 404 woes

Toni Mueller support at oeko.net
Thu Jul 16 13:30:18 MSD 2009


Hi,

On Mon, 13.07.2009 at 23:57:34 +0400, Igor Sysoev <is at rambler-co.ru> wrote:
> On Mon, Jul 13, 2009 at 08:48:29PM +0200, Toni Mueller wrote:
> > On Mon, 13.07.2009 at 22:22:25 +0400, Igor Sysoev <is at rambler-co.ru> wrote:
> > > On Mon, Jul 13, 2009 at 07:04:09PM +0200, Toni Mueller wrote:
> > > > 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).
> > 
> > thanks for the quick answer, but I don't quite understand:
> > 
> > I already assumed that the second would cause an external redirect, but
> > why the first statement would not lead to an internal rewrite of the
> > URI and then try that through the remainder of the configuration, I
> > don't see.
> 
> What do you see in the first case ? You should see main page with
> unchanged nonexistent URI in browser.

in the first case, I see a standard 404 nginx error page. But I
expected nginx to display the same thing that I see in the second case
(I have a redirection for "/" to land somewhere else).


Kind regards,
--Toni++






More information about the nginx mailing list