Answer the question
In order to leave comments, you need to log in
PHP redirect, is there any advanced features?
Such a question should be banned from indexing the link to the redirect in robots did everything, but pages with redirects stubbornly fall into the Google index.
the link is like this ../goto/link.php
, and the redirect is like this
<?php $URL="http://link.com";
header("Location:$URL");
exit();
?>
<META NAME="ROBOTS" CONTENT="NOINDEX,NOFOLLOW">
Answer the question
In order to leave comments, you need to log in
The only solution that comes to my mind is to pass the get parameter and, by its presence, display a line in the header of the page
header("Location:$URL"); // there is no such code so that the bot understands that the page has dropped out of the index header("Location:$URL" , true , your code ); /// up to one place in this situation,
if you don't want to spoil the url, then when redirecting, declare a constant, then use it to output the same string and redefine the constant after output so that there are no problems.
Robots.txt in most cases is not a panacea for closing content, since, for example, another site can place a link to your content and the bot will safely index your page. the meta tag will be the output.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question