PHP header() redirect in Google App Engine

北城余情 提交于 2019-12-12 14:50:07

问题


I try to make a header redirect on an Google App engine instance with

header("HTTP/1.1 301 Moved Permanently");
header("Location: http://".$location);
header("Connection: close");
die();

It's working on my local development environment. On Google App Engine I receive the 301 but it doesn't redirect to the new location, instead there's a white screen.


回答1:


It was a encoding problem. I had to urlencode() all parts of $location. On my local MAMP environment there was no problem.



来源:https://stackoverflow.com/questions/32227855/php-header-redirect-in-google-app-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!