duadpnld426905
2014-04-30 07:20
浏览 143
已采纳

在codeigniter中找不到请求的url错误

I have created a login page using codeigniter framework.it works well. After install apachi,mySql and php again my website login is not working. I can go to "http://localhost/test/" and login button is there. After The requested URL /test/user/user/login was not found on this server.When I click the login button redirect to the page "http://localhost/test/user/user/login" and it says "The requested URL /test/user/user/login was not found on this server" How can I solve this? It works well before I format the computer and install php again.

图片转代码服务由CSDN问答提供 功能建议

我使用codeigniter framework.it创建了一个登录页面效果很好。 安装apachi,mySql和php之后再次 网站登录无法正常工作。 我可以转到“http:// localhost / test /”,登录按钮就在那里。 后找不到请求的URL / test / user / user / login 在此服务器上。当我单击登录按钮重定向到页面“http:// localhost / test / user / user / login”时,它显示“请求的URL / test / user / user / 在这台服务器上找不到登录“ 我能解决这个问题吗? 在我格式化计算机并再次安装php之前,它运行良好。

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • dongluan1743 2014-05-02 04:34
    已采纳

    sloved after changing AllowOverride None to AllowOverride All in /etc/apache2/sites-enabled/000-default .

    已采纳该答案
    评论
    解决 无用
    打赏 举报
  • dongtui2029 2014-04-30 07:26

    Why you have used user twice like http://localhost/test/user/user/login. Here, user is the name of the controller. So the url should be like http://localhost/test/user/login. If you are not using htaccess file ie, mod_rewrite is not enabled, then the url should be like http://localhost/test/index.php/user/login

    评论
    解决 无用
    打赏 举报
  • dsxon40042 2015-02-22 12:08

    I have had a lot of problems trying to fix this issue and finally I have figured out that without changing index.php field within the config.php file, you have to specify the address like this; http://localhost/codeigniter_folder_name/index.php?/controller_name

    This has solved it for me.

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题