I'm getting a 404 error on my CodeIgniter site, I've had a look around at the other answers and playing with the .htaccess but yet to solve. Its located on my domain.co.uk/admin
Controller -
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Projects extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function index() {
$this->load->model('project');
$data['projects']=$this->project->get_projects();
echo"<pre>";print_r($data['projects']);echo"</pre>";
}
}
Model -
<?php
class Project extends CI_Model{
function get_projects($num=10,$start=0){
$this->$db->select()->from('projects')->where('active',1)->order_by('date_added','desc')->limit($num,$start);
$query=$this->db->get();
return $query->result_array();
}
}
I've also added these routes -
$route['default_controller'] = 'projects';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
Currently have this .htaccess in my domain/admin folder
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
Can anyone see why I might be getting a 404 error