Я только что переместил несколько статических веб-сайтов на Google App Engine, где, если вы хотите использовать свой собственный домен, требуется поддомен www.Оба домена маршрутизируются правильно, за исключением того, что полный путь URL не передается на поддомен, если в ссылке не введен www;без www, страницы перенаправляются домой.
Работающий сайт - любая ссылка будет работать:http://www.synth.tk/daw/
http://synth.tk/daw/
Проблемный сайт - будет работать только первая ссылка;второй перенаправляет на домашнюю страницу:http://www.carolyncaton.com/photos/
http://carolyncaton.com/photos/
Оба домена настроены с FreeDNS, используя следующие записи хоста в соответствии с инструкциями Google:
@ | A | 216.239.32.21
@ | A | 216.239.34.21
@ | A | 216.239.36.21
@ | A | 216.239.38.21
www | CNAME | ghs.google.com
И оба используют следующее app.yaml
файл:
application: app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.css)
mime_type: text/css
static_files: static/\1
upload: static/(.*\.css)
- url: /(.*\.html)
mime_type: text/html
static_files: static/\1
upload: static/(.*\.html)
expiration: "1h"
- url: /(.*\.js)
mime_type: text/javascript
static_files: static/\1
upload: static/(.*\.js)
- url: /(.*\.eot)
mime_type: application/vnd.ms-fontobject
static_files: static/\1
upload: static/(.*\.eot)
- url: /(.*\.(svg|svgz))
mime_type: images/svg+xml
static_files: static/\1
upload: static/(.*\.(svg|svgz))
- url: /(.*\.ttf)
mime_type: font/truetype
static_files: static/\1
upload: static/(.*\.ttf)
- url: /(.*\.woff)
mime_type: application/x-font-woff
static_files: static/\1
upload: static/(.*\.woff)
- url: /(.*\.pdf)
mime_type: application/pdf
static_files: static/\1
upload: static/(.*\.pdf)
# image files
- url: /(.*\.(bmp|gif|ico|jpeg|jpg|png))
static_files: static/\1
upload: static/(.*\.(bmp|gif|ico|jpeg|jpg|png))
# index files
- url: /(.+)/
static_files: static/\1/index.html
upload: static/(.+)/index.html
expiration: "15m"
- url: /(.+)
static_files: static/\1/index.html
upload: static/(.+)/index.html
expiration: "15m"
# site root
- url: /
static_files: static/index.html
upload: static/index.html
expiration: "15m"