Welcome! Log In Create A New Profile

Advanced

Re: Match all requests

November 13, 2011 11:46AM
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@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Match all requests

Ilan Berkner November 13, 2011 11:00AM

Re: Match all requests

Lucas Clemente Vella November 13, 2011 11:32AM

Re: Match all requests

Valentin V. Bartenev November 13, 2011 11:34AM

Re: Match all requests

Igor Sysoev November 13, 2011 11:46AM

Re: Match all requests

Ilan Berkner November 13, 2011 04:40PM

Re: Match all requests

Piotr Karbowski November 13, 2011 04:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 213
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready