我需要打开的URL,如下列:笨 - 我如何重写URL与URL参数
/catalog/products/24
到清洁的URL,如下列:
/catalog/product-name-here
我用笨,并重新启动引擎并安装。我也设置在routes.php
文件改写如下:
$route['catalog/products/(:any)'] = 'catalog/view/$1';
问题:哪里有/product-name-here
更换产品ID /24
?我可以成功获取参数$1
,并获取产品名称。我似乎无法弄清楚如何用这个动态值重写URL。提前致谢!
是的,你可能是对的,谢谢你的答案! – Farbour 2009-10-13 19:56:48
我做到了这一点,它的工作,非常感谢! – Farbour 2009-10-16 00:53:37