Serving name.html files under /name as well as /name.html ?
See original GitHub issueAny plans to support serving static html files on their “basename path”? That is for example http-server, github pages, and others, serve .html files both under /name.html
and /name
by default, so the index page would be accessible at:
/
/index
/index.html
And a non-index page at:
/page
/page.html
For me specifically I need to save my html files with an .html extension, serve them as simply as possible (static folder serve), and view them through an URL without the .html extension (since it’s cleaner and a common pattern for wikis).
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Rules to Follow When Naming HTML Files - ThoughtCo
Naming your HTML files is important, but there are some conventions you should use when choosing what to name your files.
Read more >Guidelines for Naming HTML Files and Folders
File names and folder names should contain only letters, digits, and underscores—no spaces, punctuation, or funny characters. We want to really ...
Read more >Links in HTML documents - W3C
The destination anchor of a link may be an element within an HTML document. The destination anchor must be given an anchor name...
Read more >How to set name of file downloaded from browser?
My question is, is there any way to specify the name of a file to be downloaded using just HTML? So a user...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
duplicate content? maybe as an option, but this will be bad for SEO as a default unless it’s a redirect (maybe as separate middleware or rewrite)
I’m using koa v2, koa-static v3, koa-mount v2, it just works right out of the box. 😃
app.use(mount('/public', serve('public', {extensions: ['.html']})));