PHP跳轉代碼默認文檔設置1 :
PHP跳轉代碼默認文檔設置2 :
- < ?php
- $HTTP_HOST=$_SERVER['HTTP_HOST'];
- if(($HTTP_HOST=="a.com")or
($HTTP_HOST=="www.a.com"))- {Header("Location:/index.html"); }
- elseif(($HTTP_HOST=="b.net")or
($HTTP_HOST=="www.b.net"))- {Header("Location: /kangbite/"); }
- elseif(($HTTP_HOST=="c.com")or
($HTTP_HOST=="www.c.com"))- {Header("Location: /c/"); }
- else
- {}
- ?>
以上就是PHP跳轉代碼的具體代碼實現方法。