kuldeep kuldeep - 4 months ago 15
PHP Question

Remove the controller name and function in url

url::http://localhost/trading/tradingcontroller/index/Titan-Company.html

remove tradingcontroller/index in url...

display url :: http://localhost/trading/Titan-Company.html

please help me thank you

Answer

You can try this


In config/routes.php file, set like this:


$route['(:any)'] = 'tradingcontroller/index/$1';
$route['tradingcontroller'] = 'tradingcontroller';