①html's Meta Refresh tab
<!DOCTYPE HTML><HTMLLang= "en"><Head> <Metahttp-equiv= "Refresh"content= "1; url=http://www.baidu.com"></Head><Body></Body></HTML>
"1; url = http://www.baidu.com "on behalf of the 1s after the jump to Baidu, HTTP status code is 302.
②javascript's window.location
<!DOCTYPE HTML><HTMLLang= "en"><Head></Head><Body> <Script>SetTimeout ("window.location.href = ' http://www.baidu.com '", +); </Script></Body></HTML>
also 1s after the jump to Baidu, HTTP status code is also 302.
③php's header
<? PHP Header (' refresh:1; url=http://www.baidu.com ');? >
1s after the jump to Baidu, HTTP status code is also 302.
Or
<? PHP Header (' location:http://www.baidu.com ');? >
Direct jump to Baidu, HTTP status code is also 302.
If you want to change the HTTP status code to 301, you can:
<? PHP Header true, 301);? >
Html/javascript/php several ways to implement page jumps