Andy's Blog » » PHP换站转向代码

PHP换站转向代码

<?php
if (isset($_SERVER['REDIRECT_URL']) && !empty($_SERVER['REDIRECT_URL'])) {
  
header("location:" . str_replace('21andy.com', 'google.com', $_SERVER['REDIRECT_URL']);
}
?>

Tags: PHP

本文地址: http://www.21andy.com/new/20060817/377.html

1 评论 to “PHP开源CMS之MODx”

  1. Andy 于 2006-11-12 01:23:22 发表:

    $currentdomain=$_SERVER["SERVER_NAME"];
    $urlscriptname=$_SERVER["SCRIPT_NAME"];
    $urlquery=$_SERVER["QUERY_STRING"];
    if($currentdomain=="www.old.com" || $currentdomain=="old.com"){
    header("location:http://www.new.com".$urlscriptname."?".$urlquery);
    exit;