首页 电脑 电脑学堂 查看内容

PHP Redirection script

2009-7-22 10:21 800 0

摘要:   Hi all. I'd like to share this simple php script of mine. This can save you a lot of money if you ...
关键词: domain redirect subdirectory index you url com list line closefp

  Hi all. I'd like to share this simple php script of mine. This can save you a lot of money if you are renting web spaces and you wanted to use multiple domains. I hope this helps.    $url1 = $line_list[0];  $url2 = $line_list[1];  $redirect = $line_list[2];    if ($url1 == $remote or $url2 == $remote):  Header ("Location:$redirect");  $closefp = fclose($fp);  endif;  endwhile;  $closefp = fclose($fp);  ?>  /*文件名 - redirect.txt (here is where you will put your domain names and directory)    domain1.com|www.domain1.com|subdirectory/index.php  domain2.com|www.domain2.com|subdirectory/index.php  */  //at the very top of your main accounts index file, put:
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部