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

261
Visualizações
Add get-parameter to rewrite_rule in .htaccess does not work

We are on the way to develop a small router via the .htaccess file. Now we are trying to pass through a get-parameter in a rewrite_rule. The problem is, that the get parameter is not passed through successfully.

For example we have the following url:

https://example.com/shop-verifizierung_2c1c759546318feb3177d7d2a023400a.html

and the following rule:

RewriteRule ^(.*)-verifizierung_(.*).html$ index.php?seite=$1&webshopparameter=verifizierung&code=$2 [L,QSA]

That example works fine and the parameters are set correctly but now we have to add an additional get-parameter token like that:

https://example.com/shop-verifizierung_2c1c759546318feb3177d7d2a023400a.html?token=6TT38831GN100844

So we expand the rewrite_rule:

RewriteRule ^(.*)-verifizierung_(.*).html?token=(.*)$ index.php?seite=$1&webshopparameter=verifizierung&code=$2&token=$3 [L,QSA]
                                         ^^^^^^^^^^^^                                                          ^^^^^^^^^

But it wont work as expected. We also tried to use {QUERY_STRING} but the result is thesame. Where is the problem here? Thanks for your help!

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

0

With your shown samples, please try following htaccess Rules. You could use THE_REQUEST variable which will be more suitable more your current condition here.

Also please make sure to clear your browser cache before testing your URLs.

RewriteEngine ON
RewriteCond %{THE_REQUEST} \s/(.*?)-verifizierung_(.*?)\.html\?token=(\S+)\s [NC]
RewriteRule ^  index.php?eite=%1&webshopparameter=verifizierung&code=%2&token=%3 [L,QSA]
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