部署教程
- 环境要求:
- PHP >= 7.4
- MySQL >= 5.6
- fileinfo扩展
- 使用Redis缓存需安装Redis扩
- 部署:
- 上传源码至网站根目录
- 设置运行目录(绑定目录)为public
- 设置伪静态
- 伪静态:
- Nginx:
-
location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; break; } }
- Apache:
-
<IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>