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. node.js - nodejs debug問題2. docker-machine添加一個已有的docker主機問題3. golang - 用IDE看docker源碼時的小問題4. docker綁定了nginx端口 外部訪問不到5. docker - 如何修改運行中容器的配置6. docker images顯示的鏡像過多,狗眼被亮瞎了,怎么辦?7. debian - docker依賴的aufs-tools源碼哪里可以找到啊?8. docker 下面創建的IMAGE 他們的 ID 一樣?這個是怎么回事????9. docker網絡端口映射,沒有方便點的操作方法么?10. docker-compose中volumes的問題
