I am using Google App Engine (go).. and I am looking to redirect https://www.ibikeride.com/scotland/comrie-croft-mountain-bike-trails/amp
to https://www.ibikeride.com/scotland/comrie-croft-mountain-bike-trails
I looked on google app engine docs on redirects but is more than pretty vague. I assume it is a redirect set up in the app.yaml file under handlers.
I actually want to redirect all files ending in "amp" to the same url structure without the amp if there is a straightforward way of doing that and to avoid me doing a 100+ individual redirect.
For relevant info here is how my current handlers look NB(before attempting this). I have a few handlers to remove the '.html' from the end of url's (for specific categories) and also one at the end to redirect all files to secure 'https'
Any help appreciated
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