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. docker镜像push报错2. PHP5.5.38.0 Apache2.4.23.0服务崩溃 系统日志php_curl.dll模块报3. javascript - svg小白,想要在svg里面插入图片4. 收缩页面显示的图片怎么写5. javascript - 如何使用nodejs 将.html 文件转化成canvas6. mysql - SELECT 多個資料表及多個欄位7. css - 盒模型布局,隐藏内部元素,外围高度居然没有改变?求解决办法8. Android 高德地图如何实现拖动平移地图时地图上的小图标不动?9. python - django 项目的 migrations 目录是否应该提交到 git10. java - 使用 RedisTemplate 操作数据

网公网安备