I am creating pages with slug in codeigniter. But it is not working if my slug in database have slashes.
like -:
1) con_r/this //not working
2) con_q //working
3) con_r/this/that //not working
Take a look at my code
routes.php
$route['default_controller'] = "home";
$route['404_override'] = 'home';
$route['translate_uri_dashes'] = TRUE;
require_once( BASEPATH .'database/DB'. EXT );
$db =& DB();
$query = $db->get('slugu');
$result = $query->result();
foreach( $result as $row ){
$route[ $row->slug ] = 'page/call/'.$row->slug;
}
Page //controller
public function call($slug){
$data['page_base'] = $this->site_model->get_page_info($slug);
/*call slider*/
echo $this->call_slider($slug);
if (empty($data['page_base'])){
show_404();
}
print_R($data['page_base']);
die;
}