Welcome! Log In Create A New Profile

Advanced

Performance question regarding regex

July 15, 2010 09:18PM
Dear forums/mailing list,

just a quick question:

[code]location / {
root /home/folder/www;
index index.php;
#if (!-e $request_filename) {
if ($request_filename !~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf)$)
{
#rewrite ^(.*)$ /index.php?q=$1 last;
rewrite ^.*$ /index.php last;
break;
}
root /home/folder/www;
expires 30d;
break;
}

[/code]

What would be faster here. Using the commented "#if (!-e $request_filename) {" or the explicit filetype matching?


Thank you in advance!
Subject Author Posted

Performance question regarding regex

panni July 15, 2010 09:18PM

Re: Performance question regarding regex

panni July 15, 2010 09:24PM

Re: Performance question regarding regex

Igor Sysoev July 16, 2010 05:32AM

Re: Performance question regarding regex

panni July 29, 2010 07:44PM

Re: Performance question regarding regex

Igor Sysoev July 30, 2010 03:10AM

Re: Performance question regarding regex

panni July 30, 2010 09:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 275
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