Reputation: 3515
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]
Upvotes: 0
Views: 1080
Reputation: 7475
You need to update your config/config.php as
$config['index_page'] = '';
Upvotes: 1