11
I’m using the Ubuntu system on my PC and my apache doesn’t seem to recognize htaccess, none, because I created one. htaccess to my project only that it does not interpret what is 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 access for example http://localhost/FJU/relatorio
it does not display the page I want, does not send the command and the error shown 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 tried enabled using command $ sudo a2enmod rewrite and edit the directory file /etc/apache2/sites-available/default for:
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
But nothing helped at all.
This post was of great help, it worked for me very well, thanks.
– Marcio Ramos