Update example.html docs with HTTP server section and info about pushState support #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've noticed it's pretty common for tutorials and docs everywhere to explain HTML5 History and then say "Oh yeah btw pushState won't work unless you redirect everything to index.html lol" - and then leave it at that. I did some searching and realised nobody's actually explained how to do it in Apache, which is what a huge number of people use..
So I published a quick guide about setting up .htaccess on Apache for pushState - I think it's worthwhile to include this info in the docs, along with other common server configs.
Personally I was searching for this info for ages so I hope it can help out a few other people...
In this pull request I've added a section to the
example.html
docs for HTTP Server Setup, which would contain all the info people need to get their apps running, locally and in production - this would cover supportingpushState
URLs, as well as all the other bits and bobs needed for various servers.It's cool with me if you want to change the text, restructure it, remove the link to the article or merge it into another section - seems to fit well, but I didn't have a style to base it on since all the other sections are placeholders :o)
I've also added a note and link in the readme with a bit about this, where it was already being mentioned (again, feel free to change.)
Ok! that's all for now.