0
For example I have a page where I list the products : http://exemplo.com/produtos.php
and when clicking on any of the products listed the URL is http://exemplo.com/produtos.php?id=2
.
Assuming the product of id=2
hold a title Relógio Patek Philippe 1928
, how to change the URL so that instead of http://exemplo.com/produtos.php?id=2
stay http://exemplo.com/produtos/Relógio-Patek-Philippe-1928
as it happens here in Sopt ?
Here is an explanation of how to do http://answall.com/questions/53973/url-amig%C3%A1vel-como-fazer-funcionar-com-htaccess
– Augusto
mass in a had seen I’ll take a look see if meets...vlw man.
– MagicHat
you would first have to make a Slug of the product name: http://stackoverflow.com/questions/19335215/what-is-a-slug then add a column to that table (of product)
slug
and put there... and then instead of searching (SELECT, SQL) where theid=2
(ex) search whereslug=Relógio-Patek-Philippe-1928
. Note that this way you have to ensure that slugs are also unique– Miguel