Php 将codeigniter url路由到另一个url段

Php 将codeigniter url路由到另一个url段,php,apache,.htaccess,routing,codeigniter-3,Php,Apache,.htaccess,Routing,Codeigniter 3,我无法将以下URL路由到CodeIgniter中的指定URI段 我想路由这个URL http://192.168.10.225/bachan/view/wholesale_detail/test-property/155454 致: http://192.168.10.225/bachan/wholesale_detail/test-property/155454 在编码点火器3x中 我已经实现了以下代码,但它没有按预期工作: $route['wholesale_detail/(:any)'

我无法将以下URL路由到CodeIgniter中的指定URI段

我想路由这个URL

http://192.168.10.225/bachan/view/wholesale_detail/test-property/155454
致:

http://192.168.10.225/bachan/wholesale_detail/test-property/155454
编码点火器3x中

我已经实现了以下代码,但它没有按预期工作:

$route['wholesale_detail/(:any)']="wholesale_details/$1";
routes.php
文件中。

尝试以下操作:

$route['bachan/([a-z]+)/([a-z]+)/(:num)'] = 'bachan/view/$1/$2/$3';
在路由中,数组键包含要匹配的URI,而数组值包含应该重新路由到的目标。在上面的示例中,如果在URL中找到文字“bachan/wholesale\u detail/test property/123”,则使用“bachan”类和“view”方法。

尝试以下操作:

$route['bachan/([a-z]+)/([a-z]+)/(:num)'] = 'bachan/view/$1/$2/$3';
在路由中,数组键包含要匹配的URI,而数组值包含应该重新路由到的目标。在上面的示例中,如果在URL中找到文字“bachan/wholesale\u detail/test property/123”,则使用“bachan”类和“view”方法。

使用以下方法:

$route['bachan/wholesale_detail/test-property/(:any)'] = 'wholesale_details/$1';
使用以下命令:

$route['bachan/wholesale_detail/test-property/(:any)'] = 'wholesale_details/$1';

没有人敢回答非常悲伤没有人敢回答非常悲伤他能吗?我相信他可以做很多事情。扩展你的答案,提供他能做什么。虽然这可能是解决问题的一个有价值的提示,但一个好的答案也能说明解决方法。请提供示例代码来说明您的意思。或者,把这篇评论当作是一种评论,不是吗?我相信他可以做很多事情。扩展你的答案,提供他能做什么。虽然这可能是解决问题的一个有价值的提示,但一个好的答案也能说明解决方法。请提供示例代码来说明您的意思。或者,考虑将此写入评论。