Домашняя страница не отвечает на codeigniter. Я правильно настроил, я попытался отладить, но не смог найти ошибку
Пожалуйста, смотрите ниже код
конфиг / routes.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$route['default_controller'] = 'home';
//$route['404_override'] = '';
//this for the admininstration console
$route['admin'] = 'admin/dashboard';
$route['admin/media/(:any)']= 'admin/media/$1';
Контроллеры / home.php
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Home extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->library('form_validation');
$this->load->model('Category_model');
$this->load->model('Product_model');
$this->load->model('Option_model');
$this->load->model('ratenreview_model');
//load Dentkart library
$this->load->library('Banners');
$this->load->library('Menus');
$this->load->model(array('location_model'));
$this->load->model('Customer_model');
$this->load->model('Testimonial_model');
$this->load->library('dentkart');
$this->load->helper(array('formatting_helper'));
$this->customer = $this->dentkart->customer();
}
private function index() {
$this->data['page'] = "Home";
$this->ratenreview_model->ecash_event_date('dob');
$this->ratenreview_model->ecash_event_date('clinic_anniversary');
$this->ratenreview_model->ecash_event_date('marrg_aniversary');
$arrCatHome =array(440,468,472,568);
for($i=0;$i<count($arrCatHome);$i++){
$data['arrCategories'][] = $this->Category_model->get_category($arrCatHome[$i]);
$data['products'][$arrCatHome[$i]] = $this->Product_model->get_homepage_category_products($arrCatHome[$i]);
foreach ($data['products'][$arrCatHome[$i]] as &$p){
$p->images = (array)json_decode($p->images);
$p->options = $this->Option_model->get_product_options($p->id);
}
}
$data['arrShopByBrand'] = $this->Product_model->get_shop_brands();
//$data['arrHomeProducts'] = $this->Product_model->getHomeProducts();
//get all booktype
//$data['arrBooktype'] = $this->Product_model->get_book_types();
$data['arrTestimonial'] = $this->Testimonial_model->getTestimonialList();
$this->load->view('vwHome',$data);
}
}
.htaccess
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L]
, а также попытался изменить контроллер по умолчанию в маршрутизаторах, получая ошибку 404
помогите пожалуйста как решить проблему