Welcome Guest, Not a member yet? Register   Sign In
remove need to specify default_controller from URL altogether
#1

[eluser]ChrisBraddock[/eluser]
I'm wring a simple app with one controller ("application.php"). I want to get rid of having to reference it in the URL altogether, e.g. I'd like to be able to use hxxp://domain.com/function/ instead of hxxp://domain.com/application/function/.

I know I can use default_controller route to default requests of hxxp://domain.com to hxxp://domain.com/application, but I still cannot explicitly access functions without putting "application" in the URL.

Help!
#2

[eluser]Jelmer[/eluser]
Take a look at routes, you need to add a rule like this:
Code:
$route['(:any)'] = 'application/$1';

More info in the User guide.
#3

[eluser]ChrisBraddock[/eluser]
Working. Beautiful - thanks!




Theme © iAndrew 2016 - Forum software by © MyBB