I am trying to route the URL. Its working nice is localhost but not working in server. I am using HMVC in codeigniter where 'home' is the module and product is controller. I want to routes if my url structure comes like mentioned.
$1 - main category slug
$2 - brand category slug
$3 - model category slug
$4 - product ID
$5 = product title
Routes.php
$route['(:any)/(:any)/(:any)/(:num)/(:any)'] = 'home/product/$1/$2/$3/$4/$5';
In which home is the name of directory and product is controller. And my code is as follows:
Product.php (Controller)
function _remap() {
$this->index();
}
function index() {
$segs = $this->uri->segment_array();
.
.
$product_id = $this->uri->segment(4);
.
.
}
site_url()? - Renjith V R$route['(:any)/(:any)/(:any)/(:num)/(:any)'] = 'home/product/index/$1/$2/$3/$4/$5';- Mr. ED