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

209
Vistas
htaccess rewrite to reverse subfolders

As basic as it gets, here is an example of what I'm trying to do: enter image description here

I have a structure that takes different types of CMS' and inside each of those installations, are language variations.

By default the structure looks like this: https://[domain]/[country]/[installation]/[language-code]

Ultimately, I'm trying to get this:

https://[domain]/[country]/[language-code]/[installation]/

I'm wondering if this can be accomplished, due to the fact the folders/languages themselves are not actual folders and in fact rewrites from the CMS' settings (within the subfolders).

As unmodified these would be examples of the current urls:

https://example.com/ca/events/en/
https://example.com/ca/store/en/
https://example.com/ca/network/en/

And example of the desired results:

https://example.com/ca/en/events/
https://example.com/ca/en/store/
https://example.com/ca/en/network/

and for each installation, they dont always have the same languages (eg. ca has en and fr, but us has en and es)

Note: subsequent pages would be appended... eg: https://example.com/ca/en/events/event-name/subpage/

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You may be be able to use this single redirect rule on top of your .htaccess:

RewriteEngine On

RewriteRule ^([a-z]{2})/(.+)/([a-z]{2}/?)$ $1/$3/$2 [L]
over 4 years ago · Santiago Trujillo Denunciar
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