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

299
Vistas
Rewrite Rules with [R=301] in .htaccess

I have decided to introduce folders into my URLs for SEO reasons. Now im trying to 301 all the old URLs.

The physical location of these 100+ pages is in the root:

www.mydomain.com/pageA1.php
www.mydomain.com/pageA2.php
www.mydomain.com/pageB1.php
www.mydomain.com/pageB2.php

I now want the URLs to include a folder name - but the physical location to stay the same:

www.mydomain.com/a-waste/pageA1.php
www.mydomain.com/a-waste/pageA2.php
www.mydomain.com/b-waste/pageB1.php
www.mydomain.com/b-waste/pageB2.php

My current rules are:

RewriteRule a-waste/pageA1.php /pageA1.php
RewriteRule a-waste/pageA2.php /pageA2.php
RewriteRule b-waste/pageB1.php /pageB1.php
RewriteRule b-waste/pageB2.php /pageB2.php

This works fine in the sense that if I browse www.mydomain.com/a-waste/pageA1.php - this URL stays in my address bar and it shows the page physically located www.mydomain.com/pageA1.php.

Now if I add [R=301,L] to this rule to tell google its permanent, it no longer rewrites the URL, it just redirects it instead? What am i missing?

thanks. Alex.

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