Is this relative location html header absolutely compatible with all browsers at all platforms? Any standards ?
Location: some_script.php?la=2&po=2030
I mean, will it always redirect to some_script.php at the current dir or not?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The standard would be this:
But to answer your question, yes it will redirect to the page X in the current folder if you don’t put a slash at first or a complete URL.
Here’s an idea I would suggest you do for every website you do. In your primary file (the main php file you use like config or whatever), create something like that :
So when you create a redirection, a link or whatever, you do this :
EDIT: November 2017. As pointed by @jordanbtucker below, the HTTP spec has been updated in June 2014 (this post is from 2012) to allow relative URIs in the Location header.