Redirectionscript
时间:2007-02-17 来源:PHP爱好者
Redirection script
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
关键词:PHP
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
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.
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$url1 = $line_list[0];
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$url2 = $line_list[1];
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$redirect = $line_list[2];
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
if ($url1 == $remote or $url2 == $remote):
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
Header ("Location:$redirect");
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$closefp = fclose($fp);
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
endif;
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
endwhile;
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$closefp = fclose($fp);
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
?>
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
/*文件名 - redirect.txt (here is where you will put your domain names and directory)
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
domain1.com|www.domain1.com|subdirectory/index.php
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
domain2.com|www.domain2.com|subdirectory/index.php
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
*/
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
//at the very top of your main accounts index file, put:
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
非常全面的一个php技术网站,php 爱好者站 http://www.phpfans.net 有相当丰富的文章和源代码.
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
关键词:PHP
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
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.
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$url1 = $line_list[0];
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$url2 = $line_list[1];
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$redirect = $line_list[2];
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
if ($url1 == $remote or $url2 == $remote):
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
Header ("Location:$redirect");
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$closefp = fclose($fp);
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
endif;
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
endwhile;
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
$closefp = fclose($fp);
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
?>
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
/*文件名 - redirect.txt (here is where you will put your domain names and directory)
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
domain1.com|www.domain1.com|subdirectory/index.php
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
domain2.com|www.domain2.com|subdirectory/index.php
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
*/
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
//at the very top of your main accounts index file, put:
www.c hinaitpower.comlA1spVwg25lii48rgAyF6LS32d
非常全面的一个php技术网站,php 爱好者站 http://www.phpfans.net 有相当丰富的文章和源代码.
相关阅读 更多 +