Reputation: 13
My .htaccess file contains following lines:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>**
My config.php has following lines:
$config['base_url'] = 'http://localhost/Shifas/Codeigniter/CodeIgniter-2.2.6';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
Default controller is Stud_controller
Upvotes: 0
Views: 789
Reputation: 458
You may have to allow mod_rewrite on apache https://www.digitalocean.com/community/tutorials/how-to-rewrite-urls-with-mod_rewrite-for-apache-on-ubuntu-16-04
You also need a trailing slash:
$config['base_url'] = 'http://localhost/Shifas/Codeigniter/CodeIgniter-2.2.6/';
$config['uri_protocol'] = 'AUTO';
Upvotes: 0
Reputation: 8964
The value you provide to $config['base_url']
must have a trailing slash.
Try
$config['base_url'] = 'http://localhost/Shifas/Codeigniter/CodeIgniter-2.2.6/';
Upvotes: 1