Performance question regarding regex

panni nginx-forum at
Fri Jul 16 05:18:33 MSD 2010

Dear forums/mailing list,

just a quick question:

[code]location / {
            root /home/folder/www;
            index  index.php;
            #if (!-e $request_filename) {
            if ($request_filename !~*
                #rewrite ^(.*)$ /index.php?q=$1 last;
                rewrite ^.*$ /index.php last;
            root /home/folder/www;
            expires 30d;


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

Thank you in advance!

Posted at Nginx Forum:,109438,109438#msg-109438

More information about the nginx mailing list