Reputation: 124
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?
Upvotes: 0
Views: 186
Reputation: 1270
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();
}
...
Upvotes: 1
Reputation: 4033
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]
Upvotes: 0
Reputation: 124
I've solved it. My model name was in lower case I've made it UC first. Thanks. default_model.php to Default_model.php
Upvotes: 0
Reputation: 682
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]
Upvotes: 1