The HTTP Location header tells the browser to load another page, it is commonly used together with a general status message, such as the 303 See Other message.
The HTTP location header is delivered by the server to the browser in a response to a HTTP GET Request.
While it may work to use a relative path in the location header, it is recommended to use the absolute path for the resource.
How to do Redirects with PHP
When performing a location redirect with PHP, we may also want to send a relevant HTTP status code. To do this, the header function is used – both to deliver the status code, and to deliver the URL that we want the browser to go to instead. I.e.
header('HTTP/1.1 303 See Other'); header('Location: http://brugbart.com/');