CodeIgniter Forums
Only default controller is working - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10)
+--- Thread: Only default controller is working (/showthread.php?tid=69736)



Only default controller is working - ralf88 - 01-11-2018

Hi everyone!
From years I've been using CodeIgniter 2 and it's very well.
Yesterday I started a new project with PHP 7 and I read it's better to use CodeIgniter 3. 
I installed CodeIgniter 3 but is loading the default controller always, but the others controllers doesn't work....

I changed my htacces but doesn't work....
<IfModule mod_rewrite.c>
RewriteEngine On

#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>


Has Anyone an idea? Thanks.


RE: Only default controller is working - InsiteFX - 01-11-2018

Did you check your routes file?

You may need to create routes for the url's, also the default controller should not be
in a sub folder.

Also all controllers and libraries need to have the first character upper case when saving them to disk.