Missing slash on URL?

Igor Sysoev is at rambler-co.ru
Tue May 27 12:39:18 MSD 2008


On Sun, May 25, 2008 at 03:32:41PM -0400, Floren Munteanu wrote:

> > -----Original Message-----
> > From: Igor Sysoev [mailto:is-G97k7egY2jIKNkxEY4oc4w at public.gmane.org]
> > Posted At: Sunday, May 25, 2008 2:40 PM Posted To: 
> > gmane.comp.web.nginx.english
> > Conversation: Missing slash on URL?
> > Subject: Re: Missing slash on URL?
> > 
> > First, instead of
> > 
> >              if (-f $request_filename) {
> >                    break;
> >              }
> > 
> >              if (!-e $request_filename) {
> >                    rewrite ^.*$ /404.html last;
> >              }
> > 
> > it's better to use:
> > 
> >              error_page  404  =/404.html;
> > 
> 
> Thanks Igor, I will do that.

Sorry, I had mistyped:

-              error_page  404  =/404.html;
+              error_page  404  = /404.html;

> > 
> > Do
> >        /var/www/html/forum
> > and
> >        /var/www/html/forum/index.php
> > 
> > exist ?
> > 
> 
> /var/www/html/forum is a directory, not a file.
> /var/www/html/forum/index.php exist and is readable, can be accessed through
> a browser.

Then /forum will be handled in location '/' as static file or dir,
and it will be redirected to /forum/.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list