codeIgniter所有页面重定向到主页?
我已经做了codeIgniter应用。它的工作哦,我本地很爽,但是当我将其部署到主要的,我的所有页面都得到重定向到主页。
I have made a codeIgniter application. Its working oh so cool on my local, but when I deploy it to the main, all my pages are getting redirected to the home page.
我有以下的目录结构:
--- WWW
-----的.htaccess
-----.htaccess
------ codeIgniter(应用程序住在这里)。
------codeIgniter (the application lives here).
我的htaccess内容如下
My htaccess reads as follows
RewriteEngine on
RewriteCond $1 ^media
RewriteRule ^(.*)$ codeIgnite/$1
RewriteCond $1 !^(index\.php|codeIgnite|images|robots\.txt)
RewriteRule ^(.*)$ codeIgnite/index.php/$1
这是我的config.php $配置['BASE_URL'] =HTTP://本地主机/ codeIgnite /;
//或者它应该只是的 HTTP://本地主机/
And this is my config.php
$config['base_url'] = "http://localhost/codeIgnite/";
// or should it just be http://localhost/ ?
有没有我需要改变一些其他的配置设置?请帮助。
Is there some other config settings I need to change ? Please help.
我的主页上显示出来就好了。问题是与其他网页。不管我给什么网址,我看到我的主页界面。
My home page shows up just fine. Problem is with other pages. No matter what URL I give, I see my home page UI.
设置$配置['uri_protocol'] =ORIG_PATH_INFO,解决了该问题。
Setting the $config['uri_protocol'] = "ORIG_PATH_INFO", fixed the issue.