This tutorial will show you that how to remove index.php from codeigniter in UBUNTU or how to enable url rewriting.
Step 1 :
Add this in htaccess file
Text
<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase / RewriteCond {3b3dd3986446f2411a115859dfb9ef0645ca07550196603d49955fcfabeac62d}{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L]</IfModule>Step 2 :
Remove index.php in codeigniter config
Text
$config['index_page'] = '';Step 3 :
Allow overriding htaccess in Apache Configuration (Command)
Text
sudo nano /etc/apache2/apache2.confand edit the file & change to
Text
AllowOverride Allfor www folder
Step 4 :
Enabled apache mod rewrite (Command)
Text
sudo a2enmod rewriteStep 5 :
Restart Apache (Command)
Text
sudo /etc/init.d/apache2 restart