Codeigniter索引页面不可见

时间:2016-04-20 21:23:49

标签: .htaccess codeigniter

我将我的codeigniter项目从我的Windows转移到Ubuntu(Virtual Box上的Guest OS)我已经在apache2(Ubuntu)中创建了一个虚拟主机,该主机已启动并正在运行。当我尝试运行mysite.lo而不是实际的index.php of my project时,浏览器会显示codeigniter包的默认index.php页面,如下所示。

Copied some parts of the index.php page displayed by the browser.


  <?php

/*
 *---------------------------------------------------------------
 * APPLICATION ENVIRONMENT
 *---------------------------------------------------------------
 *
 * You can load different configurations depending on your
 * current environment. Setting the environment also influences
 * things like logging and error reporting.
 *
 * This can be set to anything, but default usage is:
 *
 *     development
 *     testing
 *     production
 *
 * NOTE: If you change these, also change the error_reporting() code below
 *
 */
    define('ENVIRONMENT', 'development');
/*

这不是我要显示的页面。我已设置base url,如下所示

$config['base_url'] = 'http://mysite.lo';

我的.htaccess文件

    <IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteBase /
       //tried this way as well RewriteBase /mysite.lo/ 
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

mysite.lo / config / routes.php中的设置

$route['default_controller'] = "login";
$route['404_override'] = 'login/home';

如果有人能帮我解决问题,将不胜感激。此致

0 个答案:

没有答案