S
S
SONce2013-10-01 15:36:33
CodeIgniter
SONce, 2013-10-01 15:36:33

Can't think of a route

The problem is this.

The site has categories (sections if you want).
The format of their links is: site.ru/razdel site.ru/razdel2 site.ru/razdel3, etc.

I can’t figure out how to correctly compose a route so that it doesn’t jam other controllers?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Bobylev, 2013-10-01
@dpigo

Routing order in CI: from private to general. Those. first describe the route for sections, and then for everything else.

A
Anton, 2013-10-01
@sHinE

I don't know how in CodeIgniter, but is it possible to set the sequence of route matching? So that the rest of the routes try to match first, and yours for the categories is the last one?

A
Artur, 2013-10-01
@kovalevsky

Write above this route all routes for other controllers.
Otherwise, there is no way in CI.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question