codeigniter问题 - 网站重定向后迁移到本地主机 [英] codeigniter problem - site redirects to localhost after migrating

查看:112
本文介绍了codeigniter问题 - 网站重定向后迁移到本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是复制从服务器的CI文件到我的本地主机,我有问题,运行网站。

i just copied the CI files from server to my localhost and I am having problem running the site.

每当我点击WAMP的站点链接 的http://本地主机/ CmpOnline /

Whenever i click the site link in WAMP http://localhost/CmpOnline/

这表明我同样的folderlist作为本地主机

it shows me the same folderlist as on localhost

这是我的htaccess的文件

this is my htaccess file

RewriteEngine on
RewriteCond $1 !^(index\.php|images|javascript|stylesheets|uploads|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

和在配置文件

$config['base_url'] = "http://localhost/CmpOnline/";

$config['index_page'] = "";

$config['uri_protocol'] = "REQUEST_URI";

我改变了这一切其他可用的选项,但它仍然无法正常工作

I changes this to all the other available options but it still does not work

我想这 的.htaccess和codeigniter不工作 和这个 删除的index.php从URL - codeigniter 2

但它仍然无法正常工作。

But it still does not work.

任何帮助吗?

推荐答案

如果

$config['uri_protocol'] = "REQUEST_URI";

将其更改为

$config['uri_protocol'] = 'PATH_INFO';

如果使用此

$config['uri_protocol'] = 'ORIG_PATH_INFO';

使用重定向或头部位置网址无效htaccess的不工作,你必须添加URL htaccess的工作

with redirect or header location to url not in htaccess will not work you must add the url in htaccess to work

这篇关于codeigniter问题 - 网站重定向后迁移到本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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