codeIgniter 3.0.0项目不能在子域工作 [英] CodeIgniter 3.0.0 Project doesn't work on sub domain

查看:235
本文介绍了codeIgniter 3.0.0项目不能在子域工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用CI(版本3.0.0)的一个项目,它完全在XAMPP本地主机。而我上传的项目子域,那么它给了一个错误点击

我处理路由器和配置设置以及。那么,这是什么错误?如何避免这种情况?有一些答案,但不适合这一点。

的config.php

  $配置['BASE_URL'] ='';
$配置['index_page'] ='';
 

routes.php文件

  $航线['default_controller'] ='店';
$路线['404_override'] ='';
$路线['translate_uri_dashes'] = FALSE;
 

.htaccess文件

 < IfModule mod_rewrite.c>
RewriteEngine叙述上
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则^(。*)$的index.php / $ 1 [L]
< / IfModule>
 

解决方案

我试着用做所有配置。但是,终于发现了问题。 的问题是与codeIgniter 3.0.0。 我用同样的code在2.0.0的作品没有一个单一的错误。

专家等到codeIgniter得到全面更新。直到那个使用codeIgniter 2.0.0。(有效期到明年codeIgniter发布。)

要下载2.0版本。 点击此处

I created a project using CI(version 3.0.0), and it works perfectly in XAMPP localhost. And i upload that project to sub domain then its giving an error Click here.

I Handle Router's and config setting as well. So what is this error?? how to avoid this?? There are some answers, But not suit for this.

Config.php

$config['base_url'] = '';
$config['index_page'] = '';

Routes.php

$route['default_controller'] = 'shop';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

.htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule>

解决方案

I tried with doing all configurations. But finally found the problem. Problem is with CodeIgniter 3.0.0. I used same code in 2.0.0 its works without a single error.

Guys wait till CodeIgniter to get complete update. Till that use CodeIgniter 2.0.0.(Valid till next CodeIgniter Release.)

To download 2.0 version. Click Here

这篇关于codeIgniter 3.0.0项目不能在子域工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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