原因:
(這裏以 nginx 服務環境爲例)
1、nginx 中配置的 root 參數路徑不正確。
2、nginx 中的參數值後面忘記加分號。
3、nginx 中沒有配置URL重寫。
server {
listen 80;
# 域名後記得加分號
server_name www.your_domain.com;
# 確保此路徑下有 index.php 文件
root "D:\www\your_domain\public";
index index.html index.htm index.php;
location / {
// …..省略部分代碼
# URL重寫
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
}
}