[eluser]Ahmed Iqbal[/eluser]
Hello, i want to replace codeigniter urls with my own urls, i think .htaccess will help me to get desire urls or route with some regex, please check our ci urls, and suggest htaccess code... in single quotations, we are passing values, in codeigniter urls, 'page' & 'category' represent controller.
For Pages:
codeigniter URL:
Code:
http://domain.com/page/'category-name'/'page-title'/
I want:
Code:
http://domain.com/category-name/page-title.html
For Category:
Codeigniter URL:
Code:
http://domain.com/category/'category-name'/
I want:
Code:
http://domain.com/category-name/
AND
Codeigniter URL:
Code:
http://domain.com/category/'category-name'/'index'/
I want:
Code:
http://domain.com/category-name/index.html
Currently, we are using route something like that:
Code:
$route['default_controller'] = 'home';
$route['category/(:any)/lists/(:any)'] = 'category/lists/$1';
$route['category/(:any)'] = 'category/index/$1';
$route['page/(:any)/(:any)'] = 'page/index/$1';