Sumitro Chowdhury wrote:
<snip>I don't know how to explain this really but, HTTP_MOVED_TEMPORARILY implies a 302 status code which means,
My question is : a)What is the reason for this behaviour ? Why does
printing a message halt the redirection ?
"The requested resource resides temporarily under a different URI."
Print some text to the browser implies a 200 OK code meaning,
"The request has succeeded."
These are both conflicting status'. The httpd can't send 2 status codes and as far as I am aware there is no scope in the HTTP protocol for returning a message in the response body about the fact that we are "Redirecting to a new site....".
b)What needs to be done to display a message saying "Redirecting .." and then the browser to auto-display the new URL ?
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=meta+refresh&btnG=Google+Search http://www.pageresource.com/html/metref.htm http://www.netmechanic.com/news/vol4/promo_no15.htm etc.. Any one of these should help you solve your problem I think
Thanks in advance ..
Sumitro Chowdhury.
Hope this helps, Richard Clarke.