Hi,
I am using a dynamic redirect to take vistors to the database stored
url as in this part of the script:
Now I want to ensure that search engine robots and web crawlers do not
index these links. Can I insert a bit of html code to accomplish this ?
EG
I have escaped the double quotes because they are inside the
echo statement.
Is the header(\"Locati on: $N_ad_link\"); in the correct place ?
Do you think this is the best way to do it ?
Thanks for any advice.
PS
Maybe I should use a meta-refresh instead:
So in the above html I will put:
Is this a better method ?
I am using a dynamic redirect to take vistors to the database stored
url as in this part of the script:
Code:
$sql = "SELECT ad_link FROM adverts WHERE advert_id = $N_ad_id";
$result = mysql_query($sql) or die("could not execute find PRODUCTS query". mysql_error());
$num = mysql_num_rows($result);
if ($num == 0 ) {
echo "There an ERROR in locating this product.";
} // endif
else{
$row = mysql_fetch_assoc($result);
$N_ad_link = "http://".$row["ad_link"];
$sql = "UPDATE adverts SET click_cnt = click_cnt+1 WHERE advert_id = $N_ad_id";
mysql_query($sql) or die("could not execute adverts update query". mysql_error());
header("Location: $N_ad_link");
exit();
index these links. Can I insert a bit of html code to accomplish this ?
EG
Code:
$sql = "UPDATE adverts SET click_cnt = click_cnt+1 WHERE advert_id = $N_ad_id";
mysql_query($sql) or die("could not execute adverts update query". mysql_error());
echo "
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
\"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<title>Temp Page</title>
<meta name=\"allow-search\" content=\"no\">
<meta name=\"robots\" content=\"all, noindex, nofollow\">
</head>
<body>
header(\"Location: $N_ad_link\");
</body>
</html>";
exit();
echo statement.
Is the header(\"Locati on: $N_ad_link\"); in the correct place ?
Do you think this is the best way to do it ?
Thanks for any advice.
PS
Maybe I should use a meta-refresh instead:
So in the above html I will put:
Code:
echo "<html> <head> <title>Temp Page</title> <meta name=\"allow-search\" content=\"no\"> <meta name=\"robots\" content=\"all, noindex, nofollow\"> <meta http-equiv ='refresh' content = '0;url = $N_ad_link'> </head> <body> </body> </html>";
Comment