So just now I was using site: and noticed that a redirect script I use which should be blocked is showing up in Google's results. In the results though it is accompanied with 'A description for this result is not available because of this site's robots.txt – learn more.' All variations of the script are showing in the index this way.
format of the script is link.php?p=word
link.php is disallowed in robots.txt
I am also, or thought, I was sending the correct headers so this would not happen in the script :
$p = $_GET['p'];
$link = array(
header('Content-Type: text/html; charset=utf-8');
header('X-Robots-Tag: noindex, nofollow, noarchive', true);
header('Location: '.$link[$p].''); // Valid URL
header('Location: /link/'); // Invalid URL
I must be overlooking something... why are the different link.php?p='s showing in the Google index?