Every time, when I try to add a new controller in CodeIniter, I get the following:
404 Page Not Found
The page you requested was not found.
carsadmin.php:
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Carsadmin extends Base_Controller {
public function index(){
echo 'Hello World!';
}
}
Any ideas why this is happening? Do I need to change the routes file?
$route['default_controller'] = "welcome";
$route['404_override'] = '';
$route['^(en|ar|ru)/pages/(.+)$'] = 'pages/index/$2';
$route['^(en|ar|ru)/profile/([0-9]+)$'] = '/profile/index/$2';
$route['^(en|ar|ru)/admin$'] = 'admin/dashboard';
$route['^(en|ar|ru)/(.+)$'] = "$2";
$route['^(en|ar|ru)$'] = $route['default_controller'];
Try it:-