根据网上说的也修改了.htaccess文件但是,不好使,第一次玩TP,部署到linux上之后也遇到了几个坑,首先是字母大小写的问题,我修改了Index首字母,然后是权限问题,最后网站首页可以访问了,但是这次又遇到了CSS无法加载的问题,希望有大佬相助,十分感谢。
.htaccess 配置:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>Nginx配置:server {
listen 80;
server_name xxxx;
charset utf-8;
set $root /home/wwwroot/;
access_log /home/wwwlogs/web.log ;
location ~ .+\.php($|/) {
root $root;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param sc
include fastcgi.conf;
}
location = / {
root $root;
index index.shtml index.html index.php;
}
location / {
root $root;
index index.shtml index.html index.php;
if ( !-f $request_filename ) {
rewrite . index.php last;
}
}
}
最佳答案