0

Estou utilizando o seguinte código htaccess:

<IfModule mod_rewrite.c> 
RewriteEngine on 


# Include in the next line all folders to exclude
RewriteCond %{REQUEST_URI}  !(app/view/*|web/*) [NC]

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d   
RewriteRule ^(.*)$ index.php?url=$1 [PT,L] 
</IfModule>

Desejo que a url de uma busca seja aceito por ele:

http://localhost/previdencia/admin/pesquisa?search=ouvidoria

Como faço funcionar?

1 Resposta 1

2

Utilize as bandeiras [QSA, L] para utilizar poder ler requisições URI via GET e também fazer reescrita. Você pode ver mais detalhes nessa pergunta: https://stackoverflow.com/questions/16468098/what-is-l-in-qsa-l-in-htaccess

Seu código ficaria assim:

# Include in the next line all folders to exclude
RewriteCond %{REQUEST_URI}  !(app/view/*|web/*) [NC]

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d   
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] 
</IfModule>

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .