chevereto v1 v2 v3   nginx BT宝塔 伪静态规则

 

if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
#ignored: "-" thing used or unknown variable in regex/rew
}
if (!-f $request_filename){
set $rule_1 1$rule_1;
}
if (!-d $request_filename){
set $rule_1 2$rule_1;
}
if ($uri !~* "\.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpe?g|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$"){
set $rule_1 3$rule_1;
}
if ($rule_1 = "321"){
rewrite /. /index.php last;
}

 

 

chevereto  v4 nginx BT宝塔 伪静态规则

 

location ~* /(importing|app|content|lib)/.*\.(po|php|lock|sql)$ {
deny all;
}
location ~ \.(jpe?g|png|gif|webp)$ {
log_not_found off;
error_page 404 /content/images/system/default/404.gif;
}
location ~* /.*\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
add_header Access-Control-Allow-Origin "*";
}
location / {
index index.php;
try_files $uri $uri/ /index.php$is_args$query_string;
}

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。