ccebby
ccebby

Reputation: 15

Moved CodeIgniter Application to a different folder, I can't access any of the controllers

I have an application that was in a folder named "project", I moved all the files from "project" into "project/admin", because I decided it was a better structure, to access the application via the www.example.com/project/admin URL.

The problem I am facing now is that I cannot access any of the controllers. The index page, which is set to show a certain page from a controller works fine, but the link doesn't work.

To make myself clear, here is an example:

Let's say I have a controller called "manage" which contains a function named "list_products". If I set the variable $route['default_controller'] = "manage/list_products" the index page ( www.example.com/project/admin ) loads perfectly. But if I try to access the URL www.example.com/project/admin/manage/list_products I get a 404. None of my pages load except for the index.php.

I have changed my base_url to the new folder but I don't know if I have to change anything else in the config.

I hope someone can help with this, Thank you.

Upvotes: 0

Views: 1161

Answers (2)

leonardys
leonardys

Reputation: 504

did you edit the .htaccess file? you should adjust RewriteBase configuration.

Upvotes: 0

Buggabill
Buggabill

Reputation: 13901

The default controller would not be set up as you describe. You should not have the function name in the default controller variable. It should be:

$route['default_controller'] = "manage";

Upvotes: 1

Related Questions