I am working on a back-end Admin Panel using codeigniter and in admin panel there are multiple user roles like Admin, Editor, Manager etc. Now i have created multiple controller for each roles like:
- controllers/Admin.php
- controllers/Editor.php
- controllers/Manager.php
So, URL become like this
- www.mysite.com/admin/anyfunction
- www.mysite.com/editor/anyfunction
- www.mysite.com/manager/anyfunction
But i want these URLs like
- www.mysite.com/u/anyfunction
- www.mysite.com/u/anyfunction
- www.mysite.com/u/anyfunction
if($user->editor) {redirect('editor/index')}andif($user->manager) {redirect('manager/index')}Ultimately I'd suggest you find a different structure though that doesn't require all these redirects though