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

141
Visualizações
How to redirect certain pages to a folder with htaccess RewriteMap from website.com/page1/ to website.com/folder/page1/

I have a .txt file with page names from an old website which I need to redirect to a folder to keep it up with the new url structure.

For example, website.com/post1/ to website.com/folder/post1/ But there are also some pages like website.com/page1/ which I don't want to redirect therefore I don't think I can use RewriteRule and want to go with RewriteMap.

I have this in my txt file calles old-urls.txt

post1 post1
post2 post2
post3 post3

I have this in my .htaccess:

ReqriteEngine on
RewriteMap oldurls "txt:/home/httpd/vhosts/website.com/httpdocs/old-urls.txt"
RewriteRule "^/(.*)" "/folder/${oldurls:$1}" [R]

Now I get 500 Internal Server error on all pages of my website. Which direction should I go?

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