0

I have controller home with function index which loads view index under home directory

class Home extends CI_Controller {      
    public function index()
    {
        $this->load->view('home/index');
    }
}

I've changed default controller call inside routes.php to home instead of welcome.

Now, when navigate to mysite.com I've got error message

Unable to load the requested file: `home/index.php`

But when I type inside address mysite.com/home everything loads.

What can be a problem?

Thanks

Update: .htaccess is

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond $1 !^(index\.php|css|Images|Content|Scripts|robots\.txt)
RewriteRule ^(.*)$ ./index.php/$1 [L]
3
  • 2
    Could you illustrate your routes.php, .htaccess or other things might help, please? Commented Jun 18, 2013 at 21:42
  • 2
    You mean you changed default controller call inside routes.php ? Commented Jun 18, 2013 at 21:46
  • yes, inside routes.php :) Commented Jun 19, 2013 at 5:27

1 Answer 1

1

You need to update your config/config.php as

   $config['index_page'] = '';
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.