301 or 302 Redirection With PHP

后端 未结 6 1270
长情又很酷
长情又很酷 2020-12-07 20:04

I\'m considering using the following code during a website launch phase to show users a down for maintenance page while showing me the rest of the site.

Is

6条回答
  •  有刺的猬
    2020-12-07 20:32

    Did you check what header you're getting? Because you should be getting a 302 with above.

    From the manual: http://php.net/manual/en/function.header.php

    The second special case is the "Location:" header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless the 201 or a 3xx status code has already been set.

    
    

提交回复
热议问题