PHP 8.0 + MySQL 5.7 · 需安装 SW 扩展
8.0.x(过高或过低均可能无法运行)5.7 / MariaDB 兼容版本,提前建好空库与账号location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
location ^~ /protected {
deny all;
}
location ~ ^/(Assets|Template)/ {
try_files $uri $uri/ /index.php?$request_uri;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ {
expires 3d;
}
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?s=$1 [L]
RewriteRule ^protected/ - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(Assets|Template)/.*$ /index.php?%{REQUEST_URI} [L,QSA]
</IfModule>
.htaccess 模式,也可把规则写入网站根目录 .htaccess(需开启 mod_rewrite)Install/install.lockprotected/config.php(可选,视是否保留原配置而定)