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

131
Vistas
Hide query string from url when user redirects to page

I am currently using webflow to host my site. In the redirection section on the hosting tab. I added a 301 redirect query string that redirects to my index, I do this because I wanted to track where do the users come from in my site.

Read this article and try it out: https://www.newmediacampaigns.com/blog/how-to-track-landing-page-redirects-using-google-analytics

So basically it states this:

  • old path: /mexico
  • new path: example.com/?key=mexico

So for example i created a redirect /mexico to go to my index with a query string. Currently it works really well, but i want to know if it is possible that the user does not see the query string when entering from a redirect link.

For example when user enters by example.com/mexico, the url search bar shows only example.com

I tried hiding it using javascript, but does not work.

    var testURL = 'myurl';
    testURL.split('?')[0]; 

Any clue? or suggestion?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The only way to do this is with the history API - not available in older browsers.

The standard way of doing this is

history.pushState("object or state to represent your page", "page title", "/thenewurlpath");

You could add this to your document.ready callback, E.G.

$(document).ready(function(){
  history.pushState("something", "newtitle", "/thenewpath");
  // Whatever else your document.ready callback is doing...
})

Hope this helped :)

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