TP5部署服务器只能打开首页其他页面全是404
问题描述
nginx.conf
server { listen80; server_name cy.280878.com; root/home/www/cy.280878.com; indexindex.php index1.php index.htm index.html; #location / { #if ( -f $request_filename) { # break; #} # if ( !-e $request_filename) { # rewrite ^(.*)$ /index.php/$1 last; # break; # } # }location ~ .+.php($|/) { #fastcgi_pass unix:/dev/shm/php-cgi.sock; fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^((?U).+.php)(/?.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include/etc/nginx/fastcgi_params;} }
.htaccess
<IfModule mod_rewrite.c>Options +FollowSymlinks -MultiviewsRewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]</IfModule>
首页:http://cy.280878.com/newswork/
404页面:http://cy.280878.com/newswork/details/index.html?id=4
问题解答
回答1:是不是图片路径传的不对
相关文章:
1. 系统重装后,恢复mysql5.5?2. Java中main方法里面的参数一定要是String []args吗?3. docker绑定了nginx端口 外部访问不到4. javascript - node.js中stat() access() open() readFile()都能判断文件是否存在?5. html5 - 目前 公司App 嵌入H5页面 做个 手机支付功能 没有做过 所以 请求各位有经验的 给个思路6. font-family - 我引入CSS3自定义字体没有效果?7. mysql - sql 左连接结果union右连接结果,导致重复性计算怎么解决?8. css3 - CSS优先级问题9. css - 如何讓圖片像雲一樣的行為?10. android - 微信的@功能如何实现的?

网公网安备