Welcome Guest, Not a member yet? Register   Sign In
routing / remapping / default_controller question
#2

[eluser]Phil Sturgeon[/eluser]
My CMS has been using routes set for each module with its own routes.php which didnt seem like too much of a pain until I saw this post.

Thinking about it, we only want requests with 1 url segment to go through to page controller right?

I haven't tested this, but in theory the following should get all 2+ segment URL's working.

Code:
$route['([a-z_-]+)/(.*)'] = "$1/$2";
$route['([a-z_-]+)'] = "page/index/$1";

$route['default_controller'] = "page";
$route['scaffolding_trigger'] = "";

I will make some modifications and test an evil plan to get all 1 segments working if they exist. Watch this space :-)


Messages In This Thread
routing / remapping / default_controller question - by El Forum - 12-19-2008, 08:39 AM
routing / remapping / default_controller question - by El Forum - 12-19-2008, 11:00 AM
routing / remapping / default_controller question - by El Forum - 12-19-2008, 11:43 AM
routing / remapping / default_controller question - by El Forum - 01-05-2009, 09:04 AM
routing / remapping / default_controller question - by El Forum - 01-21-2009, 03:45 PM
routing / remapping / default_controller question - by El Forum - 01-21-2009, 04:59 PM
routing / remapping / default_controller question - by El Forum - 01-22-2009, 08:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB