Pesquisar na Comunidade
Mostrando resultados para as tags ''busca url amigavel''.
Encontrado 1 registro
-
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+bugres Quero que me venha este resultado localhost/site/cidades/barra+do+bugres No meu .HTACCESS esta assim 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 <IfModule mod_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 ?> Na minha caixa de pesquisa esta assim <div class="search_form"> <form action="/cidades" method="get" name="lc" target="_top"> <div class="form-group"> <input name="lc" id="lc" type="text" class="form-control" placeholder="Buscar cidades..."> </div> <div class="btn_group"> <input type="submit" value="<?php echo ConfigPainel('botao_buscar'); ?>" class="btn btn-block"> </div> </form> </div>