Http-server: Use urlRewrite technique to redirect index.html to support html5 mode

Created on 22 Jan 2015  路  6Comments  路  Source: http-party/http-server

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

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.

All 6 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Altiano picture Altiano  路  7Comments

ducklord picture ducklord  路  5Comments

laughinghan picture laughinghan  路  5Comments

frank-dspeed picture frank-dspeed  路  7Comments

gswebspace picture gswebspace  路  6Comments