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

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;
}

On Wed, Jul 07, 2010 at 04:40:16PM +0200, Fernando P. wrote:

}

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 S.
http://sysoev.ru/en/