I have read the url routing topic in user guide of the CI.

I am doing this for the first time so may I misunderstood some technique so feel free to point it out. 

I am working on a creating a custom url according the product. 
Currently I am getting a single product detail by Id.

I have use this anchor tag for sending a id to the controller.

```
<a href="<?php echo base_url("product_controller/getSingle_product_function/{$value->product_id}"); ?>">

```

so my url is : `myWebsite/product_controller/getSingle_product_function/1`

What I want in the url is : `myWebsite/product_name-product_type/1`

for getting this url I have to create a route at the routes.php, but the propblem is how do I get my product name and type to the routes.php or how do i get that.

```
$route['product_name-product_type/1'] = "product_controller/getSingle_product_function/1";

```

Updated Work:

Now After seeing some answers I have created an anchor which look like below,

```
<a href="<?php echo base_url("product_controller/getSingle_product_function/product_name/product_type/produt_id"); ?>">

```

so the url before route : www.website.com/controller/function/xyz-name/abc-type/1 

& then I created a root, 

```
$route['(:any)/(:any)/(:any)/(:num)'] = "product_controller/product_function/(:any)/(:any)/(:any)/$1";

```

Final Url After route : www.website.com/xyz-name/abc-type/1

Now the only question is that is my final route is correct or not?