I want to make a page of redireccionando.html
but I have several links in índex.html
and I do not want to have to do redireccionando_link_1.html
, redireccionando_link_2.html
, etc.
Is it possible that I only have to do one redirecting page instead of one for each different link my page has?
That is, call redireccionando.html
with a parameter that is the link that was clicked on.
Resolved:
At redireccionando.html
I added the following script >
<script language="JavaScript" type="text/javascript">
var url = location.href;
var arr_url=url.split("?");
var arr_var =arr_url[1].split("=");
var pagina= arr_var[1];
function redireccionar(){
location.href=pagina
}
setTimeout ("redireccionar()", 1000);
</script>
The page is called using the following format: http://www.yoyomero.com/redirecting.html?next=http://www.google.com
Where http://www.yoyomero.com/redirecting.html
is the page
And ?next=http://www.google.com
is where you want to go