Page

How to redirect

Let’s begin with a simple redirect. You changed your site a bit .. but people may have bookmarked a certain page of your site … now the page isn’t there anymore … you can just redirect it to the new page with the following code:

<? PHP
$URL="http://savasplace.com";
header ("Location: $URL");
echo "<title>Redirecting to $URL</title>";
?>

Now … if you want to redirect your visitor depending on his browser:

<?php
if ($name = strstr ($HTTP_USER_AGENT, "MSIE"))
{
Header ("Location: http://savasplace.com/");
}
else
{
Header ("Location: http://savasplace.com/templates/");
}

?>

So … if your visitor is using Internet Explorer he will go to http://savasplace.com … if he is using any other browser he will go to http://savasplace.com/templates/

You can also apply different CSS styles depending on the visitors address. View the script

Stay Connected

Subscribe to RSS Feed

Subscribe to RSS Feed

Follow me on Twitter

Follow me on Twitter

Subscribe via e-mail

Subscribe via e-mail


Post your comment

Leave a Reply

Time limit is exhausted. Please reload the CAPTCHA.