代码中的php中的Url路由错误 [英] Url routing errors in php in codeigniter

查看:183
本文介绍了代码中的php中的Url路由错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显示首页上的登录表单,但当它发布到其他页面时,该帖子不会发生。问题是,网址如下: http:// sitename / users / action ,这是404未找到url。但是当我硬编码的路径到控制器,(也就是停止使用base_url +/ users / action和使用base_url +/ system / application / controllers / users / action)它开始工作。我如何解决这个问题?

My login form on front page is displayed, but when it posts to other pages, the post does not happen. THe problem is that the url is like: http://sitename/users/action which is a 404 not found url. But when i hard code the path to controller, (that is, stop using base_url + "/users/action" and use base_url + "/system/application/controllers/users/action") it starts working. How can i fix this problem?

推荐答案

我有.htaccess文件在错误的文件夹,在system / application / config /文件夹,而不是根文件夹。后粘贴文件在根文件夹中,问题解决了。

i had the .htaccess file in the wrong folder, inside the system/application/config/ folder, instead of the root folder. after i pasted the file in the root folder, the problem was solved.

这篇关于代码中的php中的Url路由错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆