Match all requests

Lucas Clemente Vella lvella at gmail.com
Sun Nov 13 16:30:44 UTC 2011


2011/11/13 Ilan Berkner <ilan at time4learning.com>

> 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?
>

Maybe if you put like this before the other locations:

 location ~ .*$
        {
                index  maintenance.htm;
                error_page 404 = maintenance.htm;
                log_not_found off;
        }


-- 
Lucas Clemente Vella
lvella at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20111113/f1739234/attachment.html>


More information about the nginx mailing list