I'm trying to set up a friendly URL system, but I have the following problem:
I have a page that has a list with multiple items. The page has this URL:
http://localhost/personal/portifolio
When the user accesses one of these items, he is redirected to:
http://localhost/personal/projeto?id=2
I would like the URL to look like this:
http://localhost/personal/projeto/nome-do-projeto
I have URL rules that work fine, but this is not working:
#codigo produtos não funciona
RewriteEngine on
RewriteCond %{QUERY_STRING} != ""
RewriteCond %{QUERY_STRING} ^id=[(0-9)]$
RewriteRule ^projeto/[(a-zA-Z0-9)+]/[(0-9)+]/?$ /projeto?id=$2&title=$1 [NC]
The parameter is thus passed:
<a href='".$_url."projeto?id=".$portifolio['id']."&tittle=".$portifolio['tittle']."'>'
in $_url
has http://localhost/personal/
.