Good Directive vs Bad Directives

antituhan dewanggaba at gmail.com
Thu May 3 13:04:07 UTC 2012


Ok thanks francis, got that point :) If "try_files" can do, we don't need
using "if", and if "try_files" can't do, we just insert "if" directive (only
if very needed). Isn't it ?


Francis Daly wrote
> 
> On Tue, May 01, 2012 at 06:34:57PM -0700, antituhan wrote:
> 
> Hi there,
> 
>> Ok, basicly it's just a different directive (simple and 'crowded'
>> directive), isn't it ?
> 
> It's a different directive, that does different things.
> 
>> So, the conclusion is that "if"
>> directive is same as "try_files", the different is only on the
>> simplicity,
>> and it's not causing cpu/mem high load, right?
> 
> "if" can do a lot more than try_files, but has its own pitfalls when
> used within location{}.
> 
> If what you want is "if this file exists, process it; otherwise do this
> other thing", that is what try_files is for.
> 
> 	f
> -- 
> Francis Daly        francis@
> 
> _______________________________________________
> nginx mailing list
> nginx@
> http://mailman.nginx.org/mailman/listinfo/nginx
> 


-----
[daemon at antituhan.com ~]# 
--
View this message in context: http://nginx.2469901.n2.nabble.com/ASK-Good-Directive-vs-Bad-Directives-tp7496293p7523541.html
Sent from the nginx mailing list archive at Nabble.com.



More information about the nginx mailing list