I've been wondering on the internet on how to work with htacces(really hard to learn it). And when I was lurking in the internet, I found this: http://www.generateit.net/mod-rewrite/
Well, I inserted my url(working on localhost):empresa.com/index.php?p=sub_artigo&id=1&cat=Mercearia
and it gave me this(with all options by default):http://empresa.com/sub_artigo/5/Mercearia.html
And the .htacces code was this:RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.html$ /index.php?p=$1&id=$2&cat=$3 [L]
And when I generate the url in php I do
<a href=\"sub_artigo/".$response2['ID_sub_artigo']."/".$response2['url'].".html\">$response2[nome_sub_artigo]</a>
And then, when I click the button, it appears like, only html. example: http://s14.postimg.org/wr137fx4x/htacces_error.jpg
Any idea what is happening ?