I uploaded my webpage using google app engine and it is working fine. It is a very simple webpage with 6 static files (.html all of them)
I need to Remove .html extension from URL. For example: I have www.example.com/contact.html, I want www.example.com/contact
My current app.yaml is
runtime: php55
api_version: 1
threadsafe: true
handlers:
- url: /
static_files: website/index.html
upload: website/index.html
- url: /
static_dir: website
All html files are Inside the "Website" folder, so how can i hide .html extension from URL
So Please help me to fix it.
If you have just 6 static files and you do not want to use .htaccess, you have to do this:
Instead of
You could:
You could try something like this, but you'll have to not rely on the existing catch-all
static_dir
handler you have at the end, since that will never be reached due to the new catch-all handler expanding any other file pattern with a.html
extension:Side note: overlapping handler url patterns for
static_dir
andstatic_files
may cause problems, see Static files are missing