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

119
Visualizações
dynamic url chaning issue with multiple files

I have 2 files called "free.php" and "new.php". for example consider, The free.php contains Hi, $_GET['s']. new.php contains Hello, $_GET['s'].

I get URLs like https://website.com/free/file-access from https://website.com/free?s=file-access and https://website.com/new/john-smith from https://website.com/new?s=john-smith. that's fine.
but I have an issue with the result. https://website.com/new/john-smith loads "free.php" file code with "s=john-smith" values. I received "Hi john-smith" what I need is "Hello John-smith"

when I run free.php i want results like "Hi, file-access" ( URL be like : https://website.com/free/file-access)

when I run new.php i want results like "Hello, john-smith" (URL be like : https://website.com/new/john-smith)

my htaccess code is

RewriteCond %{THE_REQUEST} \s/(free)\?s=([^\s]+)\s [NC]
RewriteRule ^ /%1/%2? [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(?:[^/]*)/(.*)/?$ free.php?s=$1 [NC,QSA,L]

RewriteCond %{THE_REQUEST} \s/(new)\?s=([^\s]+)\s [NC]
RewriteRule ^ /%1/%2? [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(?:[^/]*)/(.*)/?$ new.php?s=$1 [NC,QSA,L]

.PHP removed using previous httacess code.

Please help me to solve this issue. thank you in advance.

over 4 years ago · Santiago Trujillo
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