-3

however mypp.appspot.com/about gives an error.

i have to include the trailing slash

mypp.appspot.com/about/ Is there any way to fix this?

For example: https://example.com/folder_name/sub_folderName/

am using this:
- url: /(.*)/?$
static_files: www/\1/index.html
upload: www/(.*)/index.html
Rodrigo C.
  • 964
  • 4
  • 12
user264675
  • 316
  • 1
  • 4
  • 18
  • With your edit, that text is no longer valid YAML – Anthon Apr 09 '18 at 12:28
  • my question was , i need to use '/ ' slash at end of urls that should redirect to same link , right now its showing 404 – user264675 Apr 09 '18 at 14:41
  • 1
    It is unclear to me if I really understand what you want. I read that you want a python/pyyaml based application that adds a slash to a url in your YAML file. If that is not the case, you should edit your question to make unambigiously clear what you want. You should also correct the broken YAML and maybe remove some non-relevant tags (e.g. if you don't want a program). Do not respond by commenting, just edit your question – Anthon Apr 09 '18 at 14:48
  • > Used non-greedy regex. https://stackoverflow.com/questions/31637884/how-to-handle-trailing-slashing-in-google-app-engine-app-yaml?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – user264675 Apr 10 '18 at 13:01

1 Answers1

0

working

References

- url: /about/?$
      static_files: www/index.html
      upload: www/(.*)



    - url: /about/(.*?)/?$
      static_files: www/\1/index.html
      upload: www/(.*)/index.html
user264675
  • 316
  • 1
  • 4
  • 18