Skip to content

[feature request] rewrite path #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
GuillaumeDesforges opened this issue Aug 3, 2024 · 0 comments
Open

[feature request] rewrite path #120

GuillaumeDesforges opened this issue Aug 3, 2024 · 0 comments

Comments

@GuillaumeDesforges
Copy link

I love using it to mock web apps using HTML pages.
However I'd like to strip the .html extension in URL path.

E.g. instead of requesting /home.html to serve local ./home.html, I'd like to request /home.

I could achieve that with a simple path rewrite, e.g. a CLI option --path-rewrite with a regex.

simple-http-server --path-rewrite='s/*.html$//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant