源碼
偽靜態(tài)
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/?http/(.*?)/?$ /index.php?url=$1 last;
}
修改配置
設(shè)置404頁(yè)面
server{
error_page 404 /404.html;
? ? location = /404.html {
? ? ? ? root /www/wwwroot/站點(diǎn)目錄;
? ? }
Apache
設(shè)置默認(rèn)404頁(yè)
更改 404.html 為 404.stml?
.htaccess 偽靜態(tài)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?http/(.*?)/?$ /index.php?url=$1 [L]
## 跳轉(zhuǎn)到 https
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://域名/$1 [R,L]
## 設(shè)置默認(rèn)首頁(yè)優(yōu)先級(jí)
DirectoryIndex index.html index.php