Rewrite issue

Pål-Kristian Hamre pkhamre at linpro.no
Tue Sep 30 18:36:12 MSD 2008


Igor Sysoev skrev:
> Also this location
> 
>     location / {
>         rewrite ^/Blocked$      /code/Scripts/Blocked.php     last;
>     }
> 
> is better to divide to
> 
>     location / {
>     }
> 
>     location = /Blocked {
>         rewrite ^     /code/Scripts/Blocked.php      last;
>     }

What is the difference between these two blocks in practice? I can
imagine less regular expressions to handle, and this will cause and
increase in the performance on sites with a large amount of traffic. Is
this true, or is just best practices for nginx?

-- 
Pål-Kristian Hamre
Redpill Linpro AS - Changing the game
Telefon: (+47) 21 54 41 68






More information about the nginx mailing list