svenstaro/miniserve

Add custom route/redirection

Opened this issue · 3 comments

Feature request:
Add the ability to serve a file/folder under a custom path, the use case I envision is for shorten urls for files under a long path.
Something like this:

miniserve . linux=pacman/pkg/linux-5.16.12.x86_64.pkg.tar.zst # or
miniserve . --path linux=pacman/pkg/linux-5.16.12.x86_64.pkg.tar.zst # or
miniserve . --route linux=pacman/pkg/linux-5.16.12.x86_64.pkg.tar.zst  # or
miniserve . --redirect linux=pacman/pkg/linux-5.16.12.x86_64.pkg.tar.zst 

I think this sounds like a cool feature. I like the last option best as it's the most clearly named one. Do you want to take a stab at it?

Hi, I am just an avid user, thanks.

While going through the open issues, I came along a sym link issue.

Idea: Use symbolic links to shorten URLs.