Google App Engine GAE-PHP标头('Location:xxx.php')-错误:未找到-在此服务器上未找到请求的URL [英] Google App Engine GAE - PHP header('Location: xxx.php') - Error: Not Found - The requested URL was not found on this server

查看:75
本文介绍了Google App Engine GAE-PHP标头('Location:xxx.php')-错误:未找到-在此服务器上未找到请求的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:未找到

在此服务器上找不到请求的URL/xxxxxx.php.

The requested URL /xxxxxx.php was not found on this server.

我正在使用标头("Location:xxx.php")在用户身份验证后进行重定向.我尝试浏览Google App Engine文档,但似乎找不到批准的使用标题重定向的方法.该文件存在,应将其合并到我的部署中.除了驻留在GAE上之外,我无法找到找不到该文件的原因.

I am using the header('Location: xxx.php') to redirect after user authentication. I have tried looking through the Google App Engine Documents but cannot seem to find approved ways of using the header redirect. The file exist and should be incorporated in my deployment. Other than it residing on GAE I cannot find a reason why the file would not be found.

php代码

header('Location: index.php'); // Redirecting To Home Page

我大致了解app.yaml处理程序发生了什么.这是我的文件的样子:

I loosely understand what is happening with the app.yaml handlers. This is what my file looks like:

application: xxxxxxxxxxxxx
version: 1
runtime: php55
api_version: 1

handlers:
- url: /
  script: index.php

- url: /profile
  script: profile.php

除此之外(直到弹出下一个错误),整个站点都可以工作.任何帮助或指导将不胜感激.谢谢

Other than this (until the next bug pops up) the entire site works. Any help or guidance would be greatly appreciated. Thank you

我找到了一个接近的答案/示例: PHP header()redirect在Google App Engine中

One close answer/example I have found though:PHP header() redirect in Google App Engine

推荐答案

为站点中的每个页面创建一个url处理程序对此有所帮助.将文件类型添加到处理程序中也有帮助.

creating a url handler for each page in the site helped with this. Adding the file type to the handler also helped.

handlers:
- url: /
  script: index.php

- url: /profile.php
  script: profile.php

它现在正在工作!

这篇关于Google App Engine GAE-PHP标头('Location:xxx.php')-错误:未找到-在此服务器上未找到请求的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆