SEO based urls : CodeIgniter routes

You can use this code for SEO urls

 
//this section enables you to use some controllers 
$route['admin/(:any)'] = "admin/$1";    
$route['contact/(:any)'] = "contact/$1";
$route['auth/(:any)'] = "auth/$1";
$route['testimonials/(:any)'] = "testimonials/$1";
 
//else everything in url will handle by this pro controller's index function
$route['(:any)'] = "pro/index";

May be when you need this you can understand this logic. crazy na Smilie: ;)

Category(s): CodeIgniter, Newbie, PHP
Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

 

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">