Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

135
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda