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

70
Views
.htaccess con dos escenarios de redirección

Mi sitio web está completamente hecho en HTML, por ejemplo en: example.com

Cuando voy a la página " Contacto ", la dirección se ve así:

ejemplo.com/contacto.html

Me gustaría dos escenarios que se dirigirán a la dirección con un sufijo "/" :

  1. ejemplo.com/contacto.html -> ejemplo.com/contacto/ (elimina el .html de la dirección y agrega un "/" al final)
  2. ejemplo.com/contacto -> ejemplo.com/contacto/

Actualmente solo tengo el número 1 en .htaccess:

 #example.com/contact/ will display the contents of example.com/contact.html RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^([^/]+)/$ $1.html [L,QSA] #301 from example.com/contact.html to example.com/contact/ RewriteCond %{THE_REQUEST} ^[AZ]{3,9}\ /.*\.html\ HTTP/ RewriteRule ^(.*)\.html$ /$1/ [R=301,L]

¿Cómo agregar un segundo escenario?

over 4 years ago · Santiago Trujillo
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!