在PHP URL路由错误在codeigniter [英] Url routing errors in php in codeigniter

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

问题描述

显示头版上我的登录表单,但是当它发布到其他页面,后不会发生。问题是,该网址是这样的:的http://站点名/用户/操作这是一个404未找​​到网址。但是,当我辛苦code的路径,控制器,(即停止使用BASE_URL +/用户/动作,并使用BASE_URL +/系统/应用/控制器/用户/动作),它开始工作。我怎样才能解决这个问题?

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文件,系统/应用/配置/文件夹内,而不是根文件夹。之后,我在根文件夹粘贴文件,问题就解决了​​。

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路由错误在codeigniter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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