Add support for extensionless files by waylan · Pull Request #131 · lepture/python-livereload

Provides support for serving files without their extension. The requested URL /path/to/file will serve the file /path/to/file.html. The feature is off by default (when default_extension is set to None), and is activated when default_extension is set to an extension (i.e. ".html").

Emulates the behavior of Jekyll's Extensionless Permalinks:

Jekyll supports permalinks that contain neither a trailing slash nor a file extension, but this requires additional support from the web server to properly serve. When using extensionless permalinks, output files written to disk will still have the proper file extension (typically .html), so the web server must be able to map requests without file extensions to these files.

Both GitHub Pages and the Jekyll’s built-in WEBrick server handle these requests properly without any additional work.

The Jekyll docs continue by demonstrating how to configure Apache and Nginx to behave the same way. This would be a useful feature to use in development servers for Python based static site generators (Jekyll clones/competitors).

Note that I did submit this upstream first, but is was rejected as a feature that Tornado did not want to offer out-of-the-box.