Home  >  Article  >  Backend Development  >  How does php determine domain name jump?

How does php determine domain name jump?

coldplay.xixi
coldplay.xixiOriginal
2020-06-09 18:03:184217browse

How does php determine domain name jump?

#How does php determine domain name jump?

php method to determine domain name jump:

<?php 
switch ($_SERVER["HTTP_HOST"]) 
{ 
case "要判断的域名": 
header("location:跳转路径"); 
break; 
case "要判断的域名": 
header("location:跳转路径"); 
break; 
?>

How does php determine domain name jump?

Copy the above file to a blank php file , save and upload to the root directory of the website. That’s it.

Recommended tutorial: "php video tutorial"

The above is the detailed content of How does php determine domain name jump?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn