比如直接访问 xxx.com/admin/order/list时,定位到了h5首页,这个问题需要配置nginx来处理。
server {
server_name xxx.com;
listen 80;
root /xxx/crm-shop/crmeb/public;
index index.php index.html;
# 这部分是处理admin路径的配置
location /admin {
try_files $uri $uri/ /admin/index.html;
}
# 这部分是thinkphp相关配置
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
# 这部分是php文件处理配置
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /xxx/crm-shop/crmeb/public$fastcgi_script_name;
include fastcgi_params;
}
}
Was this helpful?
0 / 0