TP5部署服務(wù)器只能打開首頁其他頁面全是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:是不是圖片路徑傳的不對
相關(guān)文章:
1. thinkPHP5中獲取數(shù)據(jù)庫數(shù)據(jù)后默認(rèn)選中下拉框的值,傳遞到后臺消失不見。有圖有代碼,希望有人幫忙2. python小白 關(guān)于類里面的方法獲取變量失敗的問題3. Python2中code.co_kwonlyargcount的等效寫法4. python小白,關(guān)于函數(shù)問題5. 求救一下,用新版的phpstudy,數(shù)據(jù)庫過段時間會消失是什么情況?6. javascript - 如何用最快的速度C#或Python開發(fā)一個桌面應(yīng)用程序來訪問我的網(wǎng)站?7. mysql數(shù)據(jù)庫做關(guān)聯(lián)一般用id還是用戶名8. linux運(yùn)維 - python遠(yuǎn)程控制windows如何實(shí)現(xiàn)9. python - 如何對列表中的列表進(jìn)行頻率統(tǒng)計(jì)?10. django - Python error: [Errno 99] Cannot assign requested address
