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. 為什么我ping不通我的docker容器呢???2. docker安裝后出現Cannot connect to the Docker daemon.3. 將SQLServer數據同步到MySQL 用什么方法?4. android - webview 自定義加載進度條5. 并發模型 - python將進程池放在裝飾器里為什么不生效也沒報錯6. numpy - python [:,2][:,None]是什么意思7. javascript - 微信小程序限制加載個數8. javascript - 微信小程序封裝定位問題(封裝異步并可能多次請求)9. javascript - 微信音樂分享10. python 怎樣用pickle保存類的實例?
