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

Fernando Perez lists at ruby-forum.com
Wed Jul 7 18:40:16 MSD 2010


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;
}
-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list