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

308
Views
¿Por qué index.html sigue abriéndose como https://www.google.com/index.html?

Estoy tratando de buscar una palabra clave en la URL y lanzar un archivo html desde javascript

aquí está mi código:

 window.setInterval(function doTheTing() { if (window.location.href.indexOf("keyword") > -1) { window.location.replace("index.html") } }, 1000)

lo que estoy tratando de hacer es abrir el archivo cuando la palabra clave está en la URL, y funciona, pero por alguna razón, cuando intento abrir index.html, abre https://www.google.com/index.html en su lugar.

*si la palabra clave está en la URL de un video de youtube, se abre como https://www.youtube.com/index.html (que no es un dominio real, por lo que solo muestra una página de error)

*si es de un tiktok que https://www.tiktok.com/index.html (que también devuelve una página de error)

y así...

¿Cómo puedo abrir index.html?

gracias por la ayuda

about 4 years ago · Juan Pablo Isaza
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!