php sayfalara da böyle
Alıntı
list($adres2) = explode("?ref", $_SERVER['REQUEST_URI']);
$adresim = "http://".$_SERVER['SERVER_NAME'].$adres2;

if (eregi('ref=', $_SERVER['REQUEST_URI'])) {
header( "HTTP/1.1 301 Moved Permanently" );
header("Location: ".$adresim);
}