sudo a2enmod rewrite
Then restart the apache service using command below.
sudo service apache2 restart
<Directory /home/project_dir>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
Allow from all
</Directory>
from
AllowOverride None
to
AllowOverride All
3. Now create a .htaccess file into the project root directory then add the following configuration.
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
$config['index_page'] = "index.php"
to
$config['index_page'] = ""