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. java-ee - JAVA8 lambdas表達式 改變外面變量的值2. docker安裝后出現Cannot connect to the Docker daemon.3. 在windows下安裝docker Toolbox 啟動Docker Quickstart Terminal 失敗!4. python - Fiddler+Android模擬器抓取app,json數據被加密了,如何解析?5. python - matplotlib安裝之后使用出錯6. java如何高效讀寫10G以上大文件7. java中返回一個對象,和輸出對像的值,意義在哪兒8. javascript - node中為中間層如何解決跨域問題9. 隨機數 - 有沒有用Python生成n個不重復隨機坐標的算法?10. css3 - css做動畫效果
