domingo, 19 de junio de 2011

URL Redirect , HTML, Javascript ,PHP

Here's how to use various methods to redirect a web page to another.

How do it in HTML?

<meta http-equiv="Refresh" content="0;url=http://moises-soft.net" />

What makes this label is to refresh the web page (Refresh) in 0 seconds to the URL: http://moises-soft.net

Note: The labels Meta must go inside of web header. Between <head> </ head>

How do it in PHP?

In PHP you can send a header location; but keep in mind that work should not be sending any text to print before.
header("Location: http://moises-soft.net");


How do it in Javascript?
In Javascript , is very simple make a redirect, to that, you can change a location property of Window, to a absolute URL where you wish redirect.

window.location="http://www.moises-soft.net";

No hay comentarios:

Publicar un comentario