DirectoryIndex cidades.php
#-------------------------------------------------------------------
# PERMISSIONANDO REESCRITA
#-------------------------------------------------------------------
RewriteEngine On # Turn on the rewriting engine
# not rewrite css, js and images
RewriteCond %{REQUEST_URI} !\.(?:css|js|jpg|gif|png)$ [NC]
RewriteRule ^categoria/(.*)$/?$ categoria.php?slug=$1 [NC,L] # ARQUIVO DE LISTAGEM DAS CATEGORIAS
RewriteRule ^pagina/(.*)$/?$ pagina_news.php?slug=$1 [NC,L] # ARQUIVO DAS NOVAS PAGINAS CRIADAS
RewriteRule ^noticias/(.*)$/?$ news.php?slug=$1 [NC,L] # ARQUIVO DE NOTICIAS
RewriteRule ^listagem/(.*)$/?$ carros.php?id=$1 [NC,L] # ARQUIVO QUE LISTA TODOS OS CARROS NO SITE
RewriteRule ^cidades cidades.php [NC,L] # ARQUIVO QUE FAZ A BUSCA NO BANCO DE DADOS
RewriteRule ^cadastrar registrar.php [NC,L] # ARQUIVO DE CADASTRO DE CLIENTE
RewriteRule ^login login.php [NC,L] # ARQUIVO DE LOGIN DE CLIENTE
RewriteRule ^cliente dashboard.php [NC,L] # ARQUIVO DA AREA DO CLIENTE
<IfModulemod_headers.c><FilesMatch"\.(ttf|ttc|otf|eot|woff|font.css|css)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch></IfModule>
No meu PHP fiz assim não sei se esta correto mais da certo
<?php
$linha =0;// contador de linhas
$pesquisar = $_GET['lc'];
$Query =DBRead('modulos','*',"WHERE status_cidade = 'S' AND nome LIKE '%$pesquisar%'
OR tabela LIKE '%$pesquisar%'
order by nome ASC LIMIT 50");if(is_array($Query)){foreach($Query as $dados){
$imagem = $dados['imagem'];
$tabela = $dados['tabela'];
$strnome = $dados['nome'];
$status_cidade = $dados['status_cidade'];
$strnome = mb_strtoupper($strnome,'UTF-8');
$linha++;// incrementa a cada passagem?>
Ola quero por url nas buscas
mais não estou conseguindo resolver isso
Ele esta me dando este resultado
localhost/site/cidades?lc=barra+do+bugresQuero que me venha este resultado
localhost/site/cidades/barra+do+bugresNo meu .HTACCESS esta assim
No meu PHP fiz assim não sei se esta correto mais da certo
Na minha caixa de pesquisa esta assim
Compartilhar este post
Link para o post
Compartilhar em outros sites