Types of redirection:
time based meta redirection:
<META HTTP-EQUIV="REFRESH" CONTENT="5;URL=http://premiumfinder.com">
----------------------------------------------------------------------------------------------------
PHP redirection:
<?
$URL="http://www.google.com";
header ("Location: $URL");
?>
------------------------------------------------------------
PHP time based redirection:
<?
sleep(5);
header ("Location: <a
href="http://www.domain.com/blah.php"
target="_blank">http://www.domain.com/blah.php</a>");
?>
---------------------------------------------------------------------------------------------------------------------------
simple javaScript redirection:
<html>
<script>
function
ridirigi(secondi,url){
window.setTimeout("window.location='"+url+"'",secondi*1000);}
</script>
<body
onload='ridirigi(5,"http://premiumfinder.com");'>
<body>
</html>
-------------------------------------------------------------------------------
simple javaScript redirection2:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
redirectionTime = "3000";
redirectionURL = "http://www.xxx.com/lesson.php";
function
redirectionTimer()
{
self.setTimeout("self.location.href
=
redirectionURL;",redirectionTime);
}
// End -->
</script>
</head>
<body
onLoad="redirectionTimer()">
<a
href="http://www.xxx.com/lesson.php"
target="_self">PLEASE CLICK
HERE TO CONTINUE IF NOT REDIRECTED
IN THREE SECONDS</a>
</BODY>
</HTML>
---------------------------------------------------------------------------------------------------------------------------
fast javaScript redirection:
<script>
window.location='http://premiumfinder.com'
</script>
---
it can look like this:
<html>
<head>
<title>You are being redirected!</title>
</head>
<body
alink=black
vlink=black
link=black>
<script>
window.location='http://premiumfinder.com'
</script>
<p align='center'>
<br><br><br><br><br><font
face='Arial' size='2'>
You are being redirected.
Please wait!<br>If you are
not redirected automatically,
then please click <a
href='http://premiumfinder.com'>
HERE</a>!
</font></p>
</body>
</html>
-----------------------------------------------------------------------------
browser redirection- it detect the type of your browser and will redirect to proper file:
<html>
<head>
<script language="JavaScript">
<!-- Hide script
// pause is the number of
seconds to wait before the
viewer is transferred 1000
equals 1 second
pauselength = 0;
//otherlocation is the URL
of the page to be transferred
to if a non-Netscape browser
is used.
//netscapelocation is the
URL of the page to be transferred
to using Netscape.
otherlocation = "indexother.html"
netscapelocation = "indexnetscape.html"
function transfer() {
if (navigator.appName == "Netscape")
{
setTimeout('window.location.href
=
netscapelocation;',pauselength)
}
else {
setTimeout('window.location.href
=
otherlocation;',pauselength);
}
}
// End hiding -->
</script>
</head>
<body
onLoad="transfer()">
BLAH
</body>
</html>
------------------------------------------------------------------------------------
2 browser redirection- it detect the type of your browser and will redirect to proper file:
<SCRIPT LANGUAGE='JAVASCRIPT'
TYPE='TEXT/JAVASCRIPT'>
<!--
if ((navigator.appName=="Microsoft
Internet Explorer") || (navigator.appName=="Netscape"))
{
if (navigator.appName=="Microsoft
Internet Explorer")
window.location = "browser_ie.htm";
else
window.location = "browser_ns.htm";
}
else
window.location = "browser_other.htm";
//--></Script>
---------------------------------------------------------------------------
Screen Resolution Redirection:
<script language="Javascript">
<!--
if (screen.width <= 640) {
alert("Sending you to a page
appropriate for screen resolution
640x480.");
document.location = "640x480.htm";
}
else if (screen.width <= 800)
{
alert("Sending you to a page
appropriate for screen resolution
800x600.");
document.location = "800x600.htm";
}
if (screen.width > 800) {
alert("You use a larger screen
resolution, we are sending
you to the appropriate page.");
document.location = "larger.htm";
}
//-->
</script>
------------------------------------------------------