Remove Controller Name From URL in CodeIgniter


You need to define custom routes under "/application/config/routes.php"
For Examples:
$route['about'] = "controller_name/about";

$route['testimonials'] = "controller_name/contact";

$route['blog'] = "controller_name/blog";
$route['blog/(:any)'] = 'controller_name/blog/$1';

Above links will work like this:
http://website.com/about
http://website.com/contact
http://website.com/blog
http://website.com/blog/quick-tips-for-blogging

Comments

Post a Comment

Popular posts from this blog

Creating Protected routes in ReactJS

Stop video playing when Bootstrap modal is closed