MENU

图床页面404

• July 6, 2018 • Read: 104 • Code

昨天将Apache换成了Nginx。今早起来发现图床挂了,解决办法配置伪静态

location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
try_files $uri $uri/ /api.php;
}
location /admin {
try_files $uri /admin/index.php?$args;
}

解决~