CodeIgniter routing not working CodeIgniter routing not working codeigniter codeigniter

CodeIgniter routing not working


had your same problem just now , simply move .htaccess file to the root of your working directory
just take it out of application folder


This is my htaccess file that I use for ALL projects:

Options -IndexesOptions +FollowSymLinks# Set the default file for indexesDirectoryIndex index.php<IfModule mod_rewrite.c>    # activate URL rewriting    RewriteEngine on    # do not rewrite links to the documentation, assets and public files    RewriteCond $1 !^(images|assets|uploads|captcha)    # do not rewrite for php files in the document root, robots.txt or the maintenance page    RewriteCond $1 !^([^\..]+\.php|robots\.txt|maintenance\.html)    # but rewrite everything else    RewriteRule ^(.*)$ index.php/$1 [L]</IfModule><IfModule !mod_rewrite.c>    # If we don't have mod_rewrite installed, all 404's    # can be sent to index.php, and everything works as normal.    ErrorDocument 404 index.php</IfModule>  

Then make sure in your config.php file:

  $config['index_page'] = '';


Recently I upgraded my PHP version on the server from 7.0 to 7.2.However my CodeIgniter Routing stopped working after doing so. All requests were returning 300 error in browser console.

I resolved my issue by switching back to PHP 7.0.