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

246
Visualizações
How to redirect *.htm *,htm *,html to *.html in .htaccess

I need to redirect *.htm *,htm *,html to *.html, but when page is *.html leave same URL *.html.

I have this rule, but there's problem -> redirect loop. What should I change?

RewriteEngine On
RewriteRule ^(.*)(\.|,)htm(l?)$ $1.html [R=301]
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

As CBroe rightly commented that issue is with your pattern that also matches .html hence will cause a redirect loop.

You can fix it by using:

RewriteRule ^(.+)(?:\.htm|,html?)$ $1.html [R=301,L,NC,NE]

PS: This assumes RewriteBase directive has been used before.

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