How to remove index.php from codeigniter in UBUNTU?
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
<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase / RewriteCond {3b3dd3986446f2411a115859dfb9ef0645ca07550196603d49955fcfabeac62d}{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] </IfModule>
Loading...
Step 2 :
Remove index.php in codeigniter config
$config['index_page'] = '';
Loading...
Step 3 :
Allow overriding htaccess in Apache Configuration (Command)
sudo nano /etc/apache2/apache2.conf
Loading...
and edit the file & change to
AllowOverride All
Loading...
for www folder
Step 4 :
Enabled apache mod rewrite (Command)
sudo a2enmod rewrite
Loading...
Step 5 :
Restart Apache (Command)
sudo /etc/init.d/apache2 restart
Loading...