簡體   English   中英

Codeigniter 網址問題:HTTP 404

[英]Codeigniter Url issue: HTTP 404

當我在 xampp 服務器上使用它時,我正在研究 codeigniter 它與這個 Url localhost.com/realestate/index.php?class/method/parameter 一起工作得很好

但是當我把類似的東西放在 Godaddy 主機上時

相同的 Url 段顯示 codeigniter 404 錯誤

為您的文件夾添加.htaccess 這是一些結果 檢查所有鏈接。

主機區分大小寫,因此在命名控制器和模型名稱時也要小心

DirectoryIndex index.php index.html

<IfModule mod_rewrite.c>

RewriteEngine On
# RewriteBase /yourfoler/
RewriteCond $1 !^(index\.php|assets|install|update) 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# For godady Shared Hosting Server uncomment the line below
RewriteRule ^(.*)$ index.php?/$1 [L]

# Please comment this if you have uncommented the above
# RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]

</IfModule>

localhost.com/realestate/index.php?class/method/parameter而不是這個,你可以localhost.com/realestate/class/method/parameter像這樣運行,下面的 htaac​​ess

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM