How to add Exception to route with :any in CodeIgniter?
Posted
by
aslamdoctor
on Stack Overflow
See other posts from Stack Overflow
or by aslamdoctor
Published on 2012-03-28T05:21:42Z
Indexed on
2012/03/28
5:28 UTC
Read the original article
Hit count: 150
In my project, have setup an admin panel under a folder inside controllers folder like this
controllers/admin_panel/dashboard.php
And when we open it like this, it loads dashboard
controller default
http://www.mysite.com/admin_panel
Now I have added a page
controller on root level to load the page content from database. So here I have some a setup of kind of CMS. To load the page controller, I have added a condition in routes as below
$route[':any'] = "page";
But what it is doing now is, when I try to open admin_panel, it loads the page controller.
So I want to add a kind of exception condition here like route any except admin_panel
Any suggestions how can I achieve this ?
Thanks in advance.
© Stack Overflow or respective owner