M
M
mynewvk2014-03-31 22:04:30
CodeIgniter
mynewvk, 2014-03-31 22:04:30

Codeigniter - how to set up Route?

I have several controllers, and I need to set up routes so that the url site.com/%username% redirects to site.com/account/index/%username%, and all other controllers work fine, such as site.com/settings, site.com/questions/one etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
German Jet, 2014-04-01
@GeraJet

for the user, you need to make the following url: site.com/user/%login_user%,
then$route['user/(:any)'] = '/account/index/user/$1';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question