Spartaok
Spartaok

Reputation: 199

Unable to load the requested file (no case sensitive)

I'm just starting use CodeIgniter and I have created a controller called Dashboard, inside that I have the following method:

public function index()
{
    $this->load->view('dashboard/home');
}

then I have defined inside the folder Views a folder called dashboard which have the following content:

enter image description here

then inside routes.php I have defined as default controller dashboard:

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

when I start the application I get:

Unable to load the requested file: dashboard/home.php

that's weird because I have no upper case letter

Upvotes: 0

Views: 61

Answers (1)

AngularJMK
AngularJMK

Reputation: 1268

Check .htaccess file inside the root folder of project.If .htaccess file not exist create .htacess file in root folder and add this below line.

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

Upvotes: 1

Related Questions