1
votes

I have a controller Products and DB table categories.

Products has index function which determines from what category should the products be loaded.

But the URL looks like this: products/index/(category-name)

And I want it to look like this: products/(category-name)

Could someone help me please? I would be very thankful.

NOTE: I do have RewriteEngine On

SOLUTION: $route['^(en|sk)/products/(:any)'] = "/products/index/$1";

1

1 Answers

1
votes

Do something like this;

$route['products/(:any)'] = "products/index/$1";

That will work for you.