Replace URL segment hyphens with spaces using htaccess rewrite rules
问题 I have a friendly URL as follows: www.dominio.com.br/cidade/sao-paulo And here's my htaccess rewrite rule: RewriteRule ^cidade/(.*)$ busca-cidade.php?cidade=$1 And the SQL query: Select * from cidades where cidade = 'sao-paulo' Is it possible to replace the hyphens with spaces using htaccess and rewrite rules? So the friendly URL will be mapped to: www.dominio.com.br/busca-cidade.php?cidade=sao%20paulo This finished my code, was great, would give to optimize. #################################