Hi, so the thing is I'm using .htaccess to hide the index.php but I still get the controller name in the url like that: http://example.com/name_controller/about My question is: is it possible to hide the name of the controller, so that only method is shown? hxxp://example.com/name_controller/about
A:
You can add an entry in the /system/application/config/routes.php
file:
$route['about'] = "controller_name/about";
jeroen
2010-06-07 16:37:46
+1
A:
You can define a custom route in config/routes.php - for example:
$route['about'] = 'name_controller/about';
Then, http://example.com/about
goes to http://example.com/name_controller/about
See Hiding the controller’s method name in the URL? in the CI forums for more information.
Justin Ethier
2010-06-07 16:38:33
Thx, works fine :)
agn0stic
2010-06-07 23:03:04