Welcome Guest, Not a member yet? Register   Sign In
Working with paths and URIs

Hi there,

I'm new to CI, and want to set up my apps so that they behave thusly:


should load up controller "Home" with function "index" (I've got this working)

and example.com/nextcontroller

should load up controller "nextcontroller" with the function "index". This won't work for me and shows up as a 500 error. To access that controller/function, instead I need to go to:


How can I make the routes behave how I've described?

Thanks any help!


I believe your answer lies in the changing the default route in the routes.php file.
then you would have to rewrite or write a .htaccess file that avoids the use of the index.php file in your url. An example is in the CI user guide. Odds are you will have it sorted if you follow the userguide and some tuts I have seen on the .htaccess file. I found nettutsplus website of great help understanding the htaccess file.

Hope this helps

Theme © iAndrew 2016 - Forum software by © MyBB