Welcome Guest, Not a member yet? Register   Sign In
How do you remove the controller from the URL?
#12

[eluser]Dam1an[/eluser]
In which case, the easiest way, assuming you don't have too many functions in the homepage controller would be to do
Code:
$route['a'] = "homepage/a";
$route['b'] = "homepage/b";
$route['c'] = "homepage/c";
$route['d'] = "homepage/d";
The admin controller should then work as normal

Alternativly (the idea just came to mind), you could take advantage of the fact that higher roues have precedence over lower routes, so you could do
Code:
$route['admin/(:any)'] = "admin/$1";
$route['(:any)'] = "homepage/$1";


this way, any URL such as wedding-site/admin/do-something would go to the admin controller, whereas wedding-site/do-something-else would go to the homepage controller


Messages In This Thread
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 11:48 AM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 01:22 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 01:31 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 01:53 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 01:57 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 02:00 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 02:04 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 02:07 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 02:15 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 02:21 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 02:24 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 02:32 PM
How do you remove the controller from the URL? - by El Forum - 04-20-2009, 02:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB