1. Configure in Apache to change the allowoverride none inside to allowoverride all
I'm using the Apache2.4.7 version here. In fact, the following red box in the Apache2.4.7 is not, directly added on the line.
In/etc/apache2/sites-enabled/000-default.conf
<directory/var/www/payserver/>
Options FollowSymLinks
AllowOverride All
Order Deny,allow
Deny from all
Allow from all
</Directory>
Note: Be sure to restart the Apache service after you modify it.
2. Executing in the terminal
sudo a2enmod rewrite
3. The htaccess file must be placed in the directory with this file plus:
Rewriteengine on
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [L]
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Removal of index.php on the Apache server in Ubnutu environment