location / {
# First attempt to serve request as file, then

# as directory, then fall back to displaying a 404.

try_files $uri $uri/ =404;

# Uncomment to enable naxsi on this location

# include /etc/nginx/naxsi.rules

if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;

}

if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;

}

if (!-f $request_filename){
rewrite (.*) /index.php;

}

}



 location /finance/ {
                index index.php index.html index.htm;
                try_files $uri $uri/ /finance/index.php?$args;
        }

 location /blog/ {
                index index.php index.html index.htm;
                try_files $uri $uri/ /blog/index.php?$args;
        }