05-10-2011, 03:44 PM
[eluser]Krumpet[/eluser]
I've read much regarding CI URLs and I feel like I understand the concept of example.com/class/function/ID.
I've also read plenty of posts regarding removing the 'index.php' via the .htaccess file. No real problem there either...I don't think.
What I'm certain I don't understand is this...
I have a controller I've named 'application'. When I load my app, it loads just fine (with or without the 'index.php'). However, when I attempt to access the 'search' function that is part of the application controller class, I get a broken URL.
I've set $route['default_controller'] = 'application' so I can load example.com and see the index.php function in my application controller (this works). I also have a 'search' function in my application controller.
Shouldn't I be able to access the search function as follows: example.com/search ? The only way I've been able to get at that function is as follows example.com/index.php/application/search
Why do I have to reintroduce the 'index.php' into the URL?
Why do I have to add 'application' to the URL? Since I've already set the default controller as 'application' and everything is loaded from there, I would think the search function would be found...but it doesn't.
Thoughts?
I've read much regarding CI URLs and I feel like I understand the concept of example.com/class/function/ID.
I've also read plenty of posts regarding removing the 'index.php' via the .htaccess file. No real problem there either...I don't think.
What I'm certain I don't understand is this...
I have a controller I've named 'application'. When I load my app, it loads just fine (with or without the 'index.php'). However, when I attempt to access the 'search' function that is part of the application controller class, I get a broken URL.
I've set $route['default_controller'] = 'application' so I can load example.com and see the index.php function in my application controller (this works). I also have a 'search' function in my application controller.
Shouldn't I be able to access the search function as follows: example.com/search ? The only way I've been able to get at that function is as follows example.com/index.php/application/search
Why do I have to reintroduce the 'index.php' into the URL?
Why do I have to add 'application' to the URL? Since I've already set the default controller as 'application' and everything is loaded from there, I would think the search function would be found...but it doesn't.
Thoughts?