Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

263
Visualizações
.htaccess to customize php url in folder

My php file is in this location: https://example.com/store/store.php?id=1

and I want to rewrite it as: https://example.com/store/store_name

I tried like below:

RewriteEngine On    # Turn on the rewriting engine
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule  ^([A-Za-z0-9_-]+)/?$  store.php?id=$1 [NC,L] #Handle page requests

But it is not working for me.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

With your shown samples, please try following htaccess Rules file. Make sure to place your htaccess Rules file in folder where store folder is present, place it along side with store folder NOT inside it.

Make sure to clear your browser cache before testing your URLs.

RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^store/(.*)/?$  store/store.php?id=$1 [QSA,NC,L]
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda