[SOLVED] Code Igniter Route doesn't work

We've installed a new instance of Code Igniter, but no route works except for the default controller.

The main index page works, but nothing else.

We've added the .htaccess file, and it looks good like this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

The application/config.config.php file looks good as well.

$config['base_url'] = 'http://'. $_SERVER['HTTP_HOST'].'/screen/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

The problem turned out to be the DEFAULT Apache setting in the httpd.conf file. We had to allow AllowOverride.

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
</Directory>

Share this post

Comments (0)

    No comment

Leave a comment

All comments are moderated. Spammy and bot submitted comments are deleted. Please submit the comments that are helpful to others, and we'll approve your comments. A comment that includes outbound link will only be approved if the content is relevant to the topic, and has some value to our readers.


Login To Post Comment