【发布时间】:2014-02-26 04:02:28
【问题描述】:
我的 Google App Engine 网站有以下 yaml 文件。
application: <my-app-id>
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /sitemap.xml
static_files: static/sitemap.xml
upload: static/sitemap.xml
- url: /
static_files: static/index.html
upload: static/index.html
- url: /
static_dir: static
当我使用本地服务器测试这个应用程序时,可以通过导航访问文件 sitemal.xml。
http://localhost:8080/sitemap.xml
但是,当我部署应用程序时,导航到以下页面只会将我重定向到 index.html(无法下载 xml 文件)。
http://<my-domain>.net/sitemap.xml
http://www.<my-domain>.net/sitemap.xml
为什么本地版本的行为与部署的版本不同?我该怎么做才能使文件在已部署的版本中可用?
【问题讨论】:
-
yourdomain.net 是否会重定向到 www.yourdomain.net?
标签: google-app-engine web search-engine web-crawler yaml