繁体   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