diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index f9e0970..0000000 --- a/nginx.conf +++ /dev/null @@ -1,5 +0,0 @@ -location / { - if (!-e $request_filename){ - rewrite ^(.*)$ /index.php?s=$1 last; break; - } -} diff --git a/source/docs/nginx-thinkphp.conf b/source/docs/nginx-thinkphp.conf new file mode 100644 index 0000000..e350af9 --- /dev/null +++ b/source/docs/nginx-thinkphp.conf @@ -0,0 +1,10 @@ +# Nginx 伪静态配置 - ThinkPHP +# 将此段内容添加到 nginx server 配置的 location / 块中即可。 +# 如果使用 source/docker/ 下的 Docker 部署方式,已内置此规则,无需额外配置。 + +location / { + if (!-e $request_filename) { + rewrite ^(.*)$ /index.php?s=$1 last; + break; + } +}