Match all requests

Ilan Berkner ilan at time4learning.com
Sun Nov 13 21:38:53 UTC 2011


Igor,

Thanks, but the code you provided still causes the
domain.com/index.phpfile to be downloaded instead of the maintenance
page to show up?

On Sun, Nov 13, 2011 at 11:44 AM, Igor Sysoev <igor at sysoev.ru> wrote:

> On Sun, Nov 13, 2011 at 10:57:53AM -0500, Ilan Berkner wrote:
> > I have this location configuration:
> >
> >         location /
> >         {
> >                 index  maintenance.htm;
> >                 error_page 404 = maintenance.htm;
> >                 log_not_found off;
> >         }
> >
> > which I thought captures all requests, however, entering "/index.php" for
> > example, causes the file to be downloaded instead of going to the
> > "maintenance.htm" file.  How can I capture all requests?
>
> location / {
>    try_files  /maintenance.htm  =404;
> }
>
>
> --
> Igor Sysoev
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 

Ilan Berkner
Chief Technology Officer
Time4Learning.com

6300 NE 1st Ave., Suite 203
Ft. Lauderdale, FL 33334
(954) 771-0914

<http://www.twitter.com/time4learning> <http://www.facebook.com/Time4Learning>


Time4Learning.com - Online interactive curriculum for home use, PreK-8th
Grade.
Time4Writing.com - Online writing tutorials for high, middle, and
elementary school students.
Time4Learning.net - A forum to chat with parents online about kids,
education, parenting and more.
spellingcity.com - Online vocabulary and spelling activities for teachers,
parents and students.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20111113/4cca3ebc/attachment.html>


More information about the nginx mailing list