Skip to content

Enable Module Rewrite Apache on Ubuntu

Hi Friends,

transaction complite codeigniter

Today i try install codeigniter on ubuntu 16.4. but i found problem when i remove index.php in codeigniter config, and also i has create file .htaccess as follow

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


problem solution for it, you can follow this step :

Change AllowOverride “None” to “All”

you can find it in sudo nano /etc/apache2/apache2.conf

<Directory /var/www/>
     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted

replace “None” with “All”

Activate module rewrite

sudo a2enmod rewrite

Restart apache

sudo /etc/init.d/apache2 restart

good luck …!



Alfin F

Technopreneur , Developer, Advisor

More Posts

Follow Me:

Published inPhp