Match all requests
Igor Sysoev
igor at sysoev.ru
Sun Nov 13 16:44:04 UTC 2011
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
More information about the nginx
mailing list