Welcome Guest, Not a member yet? Register   Sign In
[split] Routing Question
#1
Thumbs Up 
(This post was last modified: 06-02-2015, 05:34 PM by ciadmin.)

Glad to hear an update from CI 2.x Series. And wanna ask about routing. First, i dunno which thread exactly to ask this question, so sorry if i got wrong thread here. As i'm using CI 2.2.1 and this is a thread that newest from it's series so i ask here.

Second, sorry for my bad english. I'm from indonesia and still understanding to develop using this framework.

And here's my question, i'm playing with route. Like this below :

Code:
$route['(:any)'] = 'smpht/index/page/$1';

it explained that any first segment will routed to smpht controller, index method, and page as first param. How i can tell the CI to search controller first, than if there's no controller it will routed. like example below :

Code:
http://localhost/lorem

first it will find 'lorem' controller, when 'lorem' controller doesn't exist it will routed to :

Code:
http://localhost/smpht/index/page/lorem

if there's anyone knows the answer, i'm totally happy to hear the solution. thanks before.
Reply


Messages In This Thread
[split] Routing Question - by rahendz - 06-02-2015, 03:36 AM
RE: [split] Routing Question - by dbsolde - 06-02-2015, 11:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB