I've the following rules on .htaccess file
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,L] What to do?
try this one hope so it will helpful for you.
DirectoryIndex index.php RewriteEngine on RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA] try to use this htaccess
Options All -Indexes RewriteEngine On #RewriteCond %{HTTPS} !=on #RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=302] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] When creating models, you need to place the file in application/models/ and name the file in all lowercase - like default_model.php
Also one thing is important :
Your model file name must be ucfirst.
The default_model.php should contain the following:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Default_model extends CI_Model { public function __construct() { parent::__construct(); } ...
$autoload['model'] = array('default_model');School.php.