zblog伪静态排除目录规则
第一种写法:
location ~* ^/(?!(a|b)) {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
第二种写法:
location ~* ^/(?![a|b]) {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
location ~* ^/(?!(abc)) {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}