We are developing an eCommerce store using CodeIgniter framework.
We need category management module, is it possible? And I have one query example below:
www.xyz.com/jewelry/ring
This is default URL, we can update this URL like
www.xyz.com/jewelry/ring-for-man
Is it possible using CodeIgniter framework or MVC in PHP?
You can use this route in your /application/config/routes.php
file
$route['jewelry/(.*)'] = 'products/jewelry/$1';
So, your final url will be jewelry/ring
with product
controller class and jewelry
function with parameter ring
called.
Yes, codeigniter provide url routing url routing for codeigniter 3.x and url routing for codeigniter 2.x Both are almost same.
You need something like this
$route['jewelry/ring'] = 'products/ring-for-man';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.