Redirect visitors to new Page

Sometime we need to redirect a visitor to another webpage. There is so many solution to redirect a user. I will show some of them which I know.



<title>Html Redirect Page</title>
<meta http-equiv=”REFRESH” content=”5; url=”>
</ head >
You will be redirect within 5 seconds..


<meta http-equiv=”REFRESH” content=”5; url=”>

// This is the part which is redirecting the current page to

content=”5; // This means it will wait 5 second and then redirect. you can increase and decrease this number.



header(“Location: index.php“);

// You have to call this line before any output.



<SCRIPT language=”JavaScript1.1″>
Redirect to main Page

In some server non of above work as redirection. I don’t know why. But the following code work well. Does
anyone know why?

header(“Pragma: public”);
header(“Expires: 0″);
header(“Cache-Control: must-revalidate, post-check=0, pre-check=0″);
header (“Location:”.time());

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>