D
D
diversant1232017-03-17 14:24:39
CodeIgniter
diversant123, 2017-03-17 14:24:39

How to make correct routing Codeigniter + HMWC?

Hello.
There are CMS based on Codeigniter and HMWC . Everything is great. All good. Everything is working.
There is only one problem - routing, now it looks like this:
site.ru/ page /page1
site.ru/ category /cat1
site.ru/ category /cat2
and so on,
but it needs to be redone to be multi-level without / page / and without / category /
site.ru/ cat1/cat2/page1
How to implement this?
Theoretically, I know how, but ready-made implementation examples are needed.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmitriy, 2017-03-17
@dmitriylanets

$route['(:any)'] = "startup/index";
//class Controller
function index(){
$segments = $this->uri->segment_array();
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question