Create routes - Codeigniter

0

Well, I have this route defined in my Routes file:

$route['novidades-e-estrategias-de-marketing-digital-em-nosso-blog/(.*)/(.*)'] = "blog/post_list/$1";

This is the url:

novidades-e-estrategias-de-marketing-digital-em-nosso-blog/19/sistema-de-crm-para-auxilio-ao-time-de-vendas

Being that it is formatted like this:

return site_url(lang('list_route').'/'.$category->id.$preffix);

But now I need to leave my url in this format:

sistema-de-crm-para-auxilio-ao-time-de-vendas-catid-19

That is:

base_url().$preffix.'-catid-'.$cateogory->id; .

My question is, with these modifications, how do I route?

    
asked by anonymous 13.04.2015 / 19:26

1 answer

2

I solved it as follows:

$route["(.*)-catid-(:num)"]      = "blog/post_list/$2";
    
13.04.2015 / 20:15