How to redirect browser if it is in IE 6?
Hello!
I like to know how to redirect according to browser version.
For example:
If the user has IE 6 or earlier it redirects to error.php
Thank you!
Hello!
I like to know how to redirect according to browser version.
For example:
If the user has IE 6 or earlier it redirects to error.php
Thank you!
The code you would use to check if the page is IE6 or before is this:
<!--[if lte IE 6]>
<![endif]-->
In the if you'd want to put in the redirect code.
but does not work:
<!--[if lte IE 6]>
<?php
if("" == ""){
$WA_Redirect_URL = "http://www.domain.com";
$WA_Redirect_KeepQS = false;
if ($WA_Redirect_URL != "") {
if ($WA_Redirect_KeepQS && $WA_Redirect_URL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "") {
$WA_Redirect_URL .= ((strpos($WA_Redirect_URL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_Redirect_URL);
}
}
?>
<![endif]-->
Since the conditional validation is client side the redirect should be also. Inside of the if you can put in a client side redirect like this:
<script type="text/javascript">
<!--
window.location = "http://www.google.com/"
//-->
</script>
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.