Disable PHP in specific directories

Rob Schultz rschultz7 at gmail.com
Thu Jun 10 21:52:26 MSD 2010


On Jun 10, 2010, at 7:44 PM, Igor Sysoev wrote:

> Could you define algorithm to find the most specific match for regexes, for
> example, what is more specific for "/dir/page1.php" - "^/dir/", "\.php$",
> "page\d+" ?
> 
No, but then again Igor you are way smarter then i am. NginX is a fantastic piece of work. Like i said earlier i just skipped that "rule" and more specific matches stuck in my head. how i thought about it 

location ~ "^/upload/\.php$" would be more exact then
location ~ "\.php$" since more parts are being explicitly matched. 

> -- 
> Igor Sysoev
> http://sysoev.ru/en/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100610/ce0f75fe/attachment.html>


More information about the nginx mailing list