websoft9/apps/roles/role_nginx/files/rewrite/thinkcmf.conf
2022-07-11 14:03:55 +08:00

14 lines
584 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Rewrite rules from : https://www.kancloud.cn/thinkcmf/faq/493494
location / {
index index.php index.html index.htm;
#如果请求既不是一个文件,也不是一个目录,则执行一下重写规则
if (!-e $request_filename)
{
#地址作为将参数rewrite到index.php上。
rewrite ^/(.*)$ /index.php?s=$1;
#若是子目录则使用下面这句将subdir改成目录名称即可。
#rewrite ^/subdir/(.*)$ /subdir/index.php?s=$1;
}
}