Welcome! Log In Create A New Profile

Advanced

Re: if (-f $request_filename) VS location ~* ^.+(css|gif|htm)

July 07, 2010 10:54AM
On Wed, Jul 07, 2010 at 04:40:16PM +0200, Fernando Perez wrote:

> Hi,
>
> Which is best between:
>
> location / {
> root /var/www/mysite;
>
> if (-f $request_filename) {
> break;
> }
> }
>
> AND
>
> location ~* ^.+(css|gif|html|jpeg|jpg|js|ogv|png|swf) {
> root /var/www/mysite;
> }

This is different things.

BTW, this if:

if (-f $request_filename) {
break;
}

is useless in

location / {
root /var/www/mysite;

if (-f $request_filename) {
break;
}
}


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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

if (-f $request_filename) VS location ~* ^.+(css|gif|htm)

Fernando Perez July 07, 2010 10:44AM

Re: if (-f $request_filename) VS location ~* ^.+(css|gif|htm)

Igor Sysoev July 07, 2010 10:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 119
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready