Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
htaccess: redirigir el artículo un nivel más profundo sin bucle

Tengo una url como esta:

https://ejemplo.com/producto/nombre-de-mi-producto

Necesito redirigir a:

https://example.com/product/item/nombre-de-mi-producto _

Intenté múltiples soluciones, también soluciones que encontré aquí en SO, pero terminé en bucles infinitos cuando accedí a /product (que NO redirigirá) y también múltiples redireccionamientos cuando llamé al producto "antiguo".

Entonces : https://example.com/product/item/my-product-name

NO redirigirá.

https://ejemplo.com/producto/nombre-de-mi-producto redirigirá a https://ejemplo.com/producto/elemento/nombre-de-mi-producto

y

https://example.com/product/ y https://example.com/product NO redirigirán.

¿Puede alguien ayudarme con esto? ¡Gracias!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede usar esta regla de redirección como su regla principal en la raíz del sitio .htaccess:

 RewriteEngine On RewriteRule ^(product)/(?!item/)(.+)$ /$1/item/$2 [L,NE,R=301]

Asegúrese de borrar la memoria caché de su navegador antes de probar este cambio.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!