问题
I uploaded my client's webpage using google app engine and it is working fine. It is a very simple webpage with 12 static files (.html all of them)
I have to remove the file, but I don't know if this can be done modifying the app.yaml or the main.py
For example: I have www.example.com/page.html
, I want www.example.com/page
回答1:
You can try this on your app.yaml assuming all your html files are in static folder.
handlers:
- url: /(.+)
mime_type: text/html
static_files: static/\1.html
upload: static/(.+)
Meaning it will match all and look up static folder with .html extension if you want specific files you can do
- url: /(hello|world)
mime_type: text/html
static_files: static/\1.html
upload: static/(.+)
means files hello.html and world.html only, to avoid handling all urls.
回答2:
If you are looking at removing the file, I do not think you can directly do that via the Administration Console or any utility.
You will need to remove the files from your local project and then upload the same again.
来源:https://stackoverflow.com/questions/20207703/remove-file-extension-google-app-engine