Welcome! Log In Create A New Profile

Advanced

try files

Posted by tiotags 
try files
August 12, 2009 03:46PM
Hello,

Shouldn't try_files make an internal redirect just like index and rewrite ? Is there any reason it doesn't do that ?

I want to serve both php and rack sites so something like this would be really helpful:
[code]
try_files /system/maintenance.html $uri $uri/ /index.php @backend;
[/code]

nginx version 0.8.8 just serves the .php file, and that isn't what I want
Re: try files
July 16, 2010 12:34AM
try_files /system/maintenance.html $uri $uri/ /index.php @backend;

If /system/maintenance.html exists then your location block will never server anything other than that. It's the first file that Nginx 'tries' to open.

Try files is in no way a rewrite. http://wiki.nginx.org/NginxCoreModule#try_files
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready