| Webtraffic Exchange | Development, Framework

CodeIgniter route issue

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: Facebook X LinkedIn Email


0 Comments

Comments are moderated to keep the discussion useful and respectful. Spam, automated submissions, and low-value promotional comments are removed.

  • No comments have been published yet.

Leave a Comment

Related Articles