seo优化网

zblog伪静态排除目录规则

admin2022-08-1613337

第一种写法

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;

}

}


(¬_¬) 还不快点抢沙发!!!

最新评论

猜你还喜欢这些...

服务热线

17683935017

qrcode

扫一扫二维码,访问手机版