-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Description
Feature or enhancement
Add handling for extensionless URLs in http.server
For example if you have a folder containing foo.html
and run python3 -m http.server
from it, you would be able to use the URL http://localhost:8000/foo
rather than having to use http://localhost:8000/foo.html
.
Pitch
A common pattern in URL design is to omit the file extension for pages, as this
both makes the URL look nicer and makes it technology agnostic (it doesn't
matter if the page is written in PHP or HTML).
The motivation for this change is the common use case of the python HTTP server
for static website development, especially amongst those learning HTML/CSS.
This change allows them to use the best practice of omitting extensions in
links and still having navigation between multiple pages working.
Previous discussion
Needs to have one on https://discuss.python.org/c/ideas/6.