Welcome! Log In Create A New Profile

Advanced

Re: 0.7.61: error_page 404 woes

Toni Mueller
July 21, 2009 04:32AM
Hi,

On Thu, 16.07.2009 at 16:31:41 +0400, Igor Sysoev <is@rambler-co.ru> wrote:
> On Thu, Jul 16, 2009 at 11:30:18AM +0200, Toni Mueller wrote:
> > On Mon, 13.07.2009 at 23:57:34 +0400, Igor Sysoev <is@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@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/;


> > 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).
>
> Could you show your configuration ?

sure, in parts. The website has a top level directory that contains only a
subdirectory for a language code, so people getting there should be redirected
to the appropriate subdirectory (currently only one).

Here are the relevant parts (logging configuration etc. snipped):


server {
...

root /....;

error_page 404 http://$server_name/;

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This was formerly "error_page 404 /;"

location = / {
rewrite . http://$server_name/de-de/;
}

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is the simple-minded redirection mentioned above. Later
on, this should be expanded to other languages.


...

}




Kind regards,
--Toni++
Subject Author Posted

0.7.61: error_page 404 woes

Toni Mueller July 13, 2009 01:04PM

Re: 0.7.61: error_page 404 woes

Igor Sysoev July 13, 2009 02:22PM

Re: 0.7.61: error_page 404 woes

Toni Mueller July 13, 2009 02:48PM

Re: 0.7.61: error_page 404 woes

Igor Sysoev July 13, 2009 03:57PM

Re: 0.7.61: error_page 404 woes

Toni Mueller July 16, 2009 05:30AM

Re: 0.7.61: error_page 404 woes

Igor Sysoev July 16, 2009 08:31AM

Re: 0.7.61: error_page 404 woes

Toni Mueller July 21, 2009 04:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 136
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready