PHP header() 在 Google App Engine 中重定向
PHP header() redirect in Google App Engine
我尝试使用
在 Google App 引擎实例上进行 header 重定向
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://".$location);
header("Connection: close");
die();
它适用于我的本地开发环境。在 Google App Engine 上,我收到 301,但它没有重定向到新位置,而是出现白屏。
这是一个编码问题。我必须对 $location 的所有部分进行 urlencode()。在我本地的 MAMP 环境中没有问题。
我尝试使用
在 Google App 引擎实例上进行 header 重定向header("HTTP/1.1 301 Moved Permanently");
header("Location: http://".$location);
header("Connection: close");
die();
它适用于我的本地开发环境。在 Google App Engine 上,我收到 301,但它没有重定向到新位置,而是出现白屏。
这是一个编码问题。我必须对 $location 的所有部分进行 urlencode()。在我本地的 MAMP 环境中没有问题。