I have a one-page application - this means that everything on the server is redirected to a single index.html file, which does the hard work and routing using the HTML5 api ( pushstate ) history.
Now I want to add a new landing page to the side - call her landing.html , and I want clients to get to landing.html first when they access / and index.html if they access any other route.
Now IE9 does not support the HTML5 History API, so using hash URLs like /books/authors in it becomes /#!/books/authors . Since the hash section of the URL is not sent to the server , since the server belongs to them, all paths are / , which means that I cannot go to landing.html or index.html based on this logic.
I thought about redirecting URLs with / to landing.html , finding #! on the client by adding a cookie on the server (or client) called notReallyHomePage and redirecting to the correct page based on the cookie on the server. This is a really hacky and not very good solution.
What would be the right way to handle routing in this case?
My backend is in ASP.NET MVC, but I don't think this is relevant to the issue
source share