代码点火器路径错误
我已经通过 .htaccess 关闭了 codeigniter 中的 index.php,并且将 config.php 中的索引文件留空 这是 .htaccess 代码,
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
我有一个指向我的控制器功能的链接,作为“cuser/authenticate”,因此 url 看起来像
mydoamin.com/cuser/authenticate
,但它显示一个错误,告诉路径未找到 当我编辑上面的 url 并
mydomain.com/index.php/cuser/authenticate
显示输出
时,我该如何解决这个问题?
i have turned off index.php in my codeigniter by .htaccess and also i left blank the index file in config.php
this is .htaccess code
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
i have a link to my controller function as 'cuser/authenticate' so the url looks like
mydoamin.com/cuser/authenticate
but it shows an error telling path not found
when i edit the above url to
mydomain.com/index.php/cuser/authenticate
it displays output
how can i tackle this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这些设置对我有用
These settings worked for me
您可以将
application/config/config.php
中的$uri_protocol
从"AUTO"
更改为"REQUEST_URI"
。You may change
$uri_protocol
in theapplication/config/config.php
from"AUTO"
to"REQUEST_URI"
.你试过这个吗?
have you tried this ?
这是从我的 codeigniter 安装的最新版本中直接复制/粘贴的内容。
在 config.php 中设置以下内容,
创建一个 .htaccess 并填充它:
Heres straight copy/paste from my codeigniter installs, latest version..
set the following in your config.php
create a .htaccess and fill it with this: