ThinkPHP 部署到新服务器后,程序可正常加载,但是css js等文件加载不到显示404,配置nginx配置文件,设定css js加载路径,解决.
location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
{
root /usr/local/nginx/html/teyaohui;
if (-f $request_filename) {
expires 1d;
break;
}
}
location ~ .*.(js|css)$
{
root /usr/local/nginx/html/teyaohui;
if (-f $request_filename) {
expires 1d;
break;
}
}