【发布时间】:2019-05-03 15:11:21
【问题描述】:
我的网站有8个页面,用php编写:https://intercultural.appspot.com在GAE中部署后,可以加载和显示index.php页面。但是,当我单击其他链接时,不显示其他页面:错误:未找到此服务器上未找到请求的 URL /file.php。
这是我的文件的目录:蓝色突出显示的是我网站的页面。 enter image description here
这是我的 app.yaml 文件:
runtime: php72 </b>
handlers:
# Serve a directory as a static resource.
- url: /styles
static_dir: styles
# Serve images as static resources.
- url: /(.+\.(gif|png|jpg))$
static_files: \1
upload: .+\.(gif|png|jpg)$
# Serve your app through a front controller at index.php or public/index.php.
- url: /(.+\.php)$
static_files: static/\1
upload: /(.+\.php)$
# I add the "/" to url bellow as suggested but still get same error
- url: /.*
script: auto
secure: always
虽然它在浏览器中显示站点地址,但它显示:错误:未找到请求的 URL /file.php 在此服务器上未找到。
app.yaml 文件中缺少什么以正确路由到我网站的其他页面?
【问题讨论】:
-
请编辑您的问题并使用代码格式而不是屏幕截图添加复制/粘贴您的代码。请查看这篇文章:stackoverflow.com/help/how-to-ask
标签: google-app-engine php-7.2 web-site-project app.yaml