web-server-chrome icon indicating copy to clipboard operation
web-server-chrome copied to clipboard

Custom 404 page support

Open TheDude53 opened this issue 6 years ago • 6 comments

There should be custom 404 page support so it doesn't just say "entry not found". It could be useful if people wanted a custom page to go with the rest of their work.

TheDude53 avatar Jun 08 '19 16:06 TheDude53

Good idea. Maybe if you have a 404.html in the root directory it would just show that, for example?

kzahel avatar Jun 08 '19 16:06 kzahel

Yes, that would work. It could just default to the "entry not found" if a 404.html page wasn't found too.

TheDude53 avatar Jun 09 '19 03:06 TheDude53

404.html is probably the best idea for a quick implementation, as it is compatible with GitHub pages. Allowing the user to manually select the file should also work, but risks overcomplicating what is supposed to be a simple, ready to run, server.

ecc521 avatar Oct 20 '19 01:10 ecc521

I can not open the server it's just showing 404

AGTeeV avatar Apr 03 '21 09:04 AGTeeV

@kzahel I am thinking about implementing this but I need some help. How would I upload the file to the extension to save it as a 404.html? Would I need to store it using local variables or however google chrome apps do it. Also, any ideas on the UI. Reading the 404.html would be easy but saving it is the hard part.

ethanaobrien avatar Apr 15 '21 12:04 ethanaobrien

@kzahel @TheDude53 I have built this - Because Kyle doesnt seem to be active on github anymore you can download my archive.zip and load it through chrome://extensions https://github.com/kzahel/web-server-chrome/pull/264

Download updated version: https://drive.google.com/file/d/12Ewzalvx5ZMdleWcGnms4XFnHWC4j65_/view?usp=sharing

ethanaobrien avatar Apr 29 '21 17:04 ethanaobrien