0
I’m trying to build a friendly URL system but I’m having the following problem:
I have a page that has a list of several items. The page has this URL:
http://localhost/personal/portifolio
When the user accesses one of these items, it is redirected to:
http://localhost/personal/projeto?id=2
I’d like the URL to look like this:
http://localhost/personal/projeto/nome-do-projeto
I have rules of Urls that work well, 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 passed like this:
<a href='".$_url."projeto?id=".$portifolio['id']."&tittle=".$portifolio['tittle']."'>`
in $_url
has http://localhost/personal/
.
Hebert, if you can, take a peek at the editing history, to see how to format a post. Here’s some more advanced help: http://answall.com/editing-help
– Bacco