Я использую Google App Engine (go) .. и надеюсь перенаправить https://www.ibikeride.com/scotland/comrie-croft-mountain-bike-trails/amp
на https://www.ibikeride.com/scotland/comrie-croft-mountain-bike-trails
Я посмотрел документацию по движку приложений Google для перенаправлений, но это более чем расплывчато. Я предполагаю, что это перенаправление, настроенное в файле app.yaml под обработчиками.
На самом деле я хочу перенаправить все файлы, оканчивающиеся на "amp", на одну и ту же структуру URL без amp, если есть простой способ сделать это и избежать моего перенаправления более 100 человек.
Для соответствующей информации, вот как мои текущие обработчики выглядят NB (до попытки этого). У меня есть несколько обработчиков для удаления «. html» в конце URL (для определенных c категорий), а также один в конце, чтобы перенаправить все файлы для защиты «https»
Любая помощь ценится
handlers:
# this serves your static/some/path/<file>.html asset as /some/path/<file>.html
- url: /(england/.*\.html)$
static_files: static/\1
upload: static/england/.*\.html$
# this serves your static/some/path/<file>.html asset as /some/path/<file>
- url: /(england/.*)$
static_files: static/\1.html
upload: static/england/.*\.html$
# this serves your static/some/path/<file>.html asset as /some/path/<file>.html
- url: /(scotland/.*\.html)$
static_files: static/\1
upload: static/scotland/.*\.html$
# this serves your static/some/path/<file>.html asset as /some/path/<file>
- url: /(scotland/.*)$
static_files: static/\1.html
upload: static/scotland/.*\.html$
# this serves your static/some/path/<file>.html asset as /some/path/<file>.html
- url: /(wales/.*\.html)$
static_files: static/\1
upload: static/wales/.*\.html$
# this serves your static/some/path/<file>.html asset as /some/path/<file>
- url: /(wales.*)$
static_files: static/\1.html
upload: static/wales/.*\.html$
# this serves your static/some/path/<file>.html asset as /some/path/<file>.html
- url: /(northern-ireland/.*\.html)$
static_files: static/\1
upload: static/orthern-ireland/.*\.html$
# this serves your static/some/path/<file>.html asset as /some/path/<file>
- url: /(northern-ireland.*)$
static_files: static/\1.html
upload: static/northern-ireland/.*\.html$
#redirect always to https
- url: /.*
script: auto
secure: always
redirect_http_response_code: 301