【发布时间】:2013-10-21 19:07:10
【问题描述】:
我的登录控制器:$this->load->view('login-view');
我的重定向到“登录视图”的链接在模板中是:anchor('login','Login');
在从 codeigniter 中的 url 中删除 index.php 之前效果很好。但是从 url 中删除 index.php 后它不起作用。
我的 .htaccess 文件是:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
我认为很难解释,这就是我所拥有的。 :(
【问题讨论】:
-
如果你像
index.php/login这样称呼它,它仍然有效? -
你设置好config.php和routes.php了吗?
-
index.php/login 工作...但 index.php 显示在 url...
-
sry 更不用说...我在 wamp 工作,离线
-
我已经设置了我的 config.php 像 $config['uri_protocol']= 'REQUEST_URI';和 $route['default_controller'] = "home";
标签: codeigniter