When html5 mode is on, refresh causes the web server to seek for the given folder,
To support this right we need a feature to always perform url rewrite to index.html (or some other page) automatically.
Something like:
-u foo.html where default of -u is index.html
Thanks
Came here to say the same thing. Allowing an easy way to specify a catch-all file for single page apps would be excellent :)
This is so necessary for using in combo with Angular!
This would be great :)
:+1: @connor4312 having this same problem. Need it for testing and developing AngularJS SPA's, but can't because HTML5 mode fails.
http-server is heavily dependent on ecstatic module and imo this is the right place to add this functionality in first place (then add support for this in http-server). Right now my current solution is duplicate the index.html and name it 404.html...isn't the best, but works.
Closing as a duplicate of #80.
Most helpful comment
http-server is heavily dependent on ecstatic module and imo this is the right place to add this functionality in first place (then add support for this in http-server). Right now my current solution is duplicate the index.html and name it 404.html...isn't the best, but works.