I found that 301 redirect response in my web service written in PHP doesn't carry custom http headers and custom cookie values if the visit is the very first visit. What I am not sure is whether this is how 301 redirect is supposed to work or whether this is just a matter of how to write my PHP code?
If this is unclear, please clarify and I will make the question clearer. My question is on how http protocol is supposed to behave in this case.