I'm using the ubuntu system on my PC and my apache does not seem to recognize htaccess, none since I created a .htaccess for my project only it does not interpret what's in the content. The content is as follows:
.htaccess
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /FJU/
RewriteRule ^visualizar/([a-z]+)/([0-9]+)$ pages/visualizar.php?p=$1&id=$2
RewriteRule ^(.*)$ index.php?page=$1
Unfortunately when I access for example http://localhost/FJU/relatorio
it does not display the page I want, it does not send the command and the displayed error is:
Not Found
The requested URL / FJU / report was not found on this server.
Apache / 2.4.7 (Ubuntu) Server at localhost Port 80
I have tried using the $ sudo a2enmod rewrite command and edit the / etc / apache2 / sites-available / default directory file to:
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
But nothing worked.