I have a single html file that I have linked to Firestore that I want to load public data on based on the URL (not url params).
The url will be generated by the user from the slug parameter in my firestore:
Domain.com/bobs-store (slug = bobs-store)
Domain.com/sallys-boutique (slug = sallys-boutique)
Domain.com/davidsgarage (slug = davidsgarage)
Based on the url I want to load Firestore data (using the slug which I pull from the url). I’m stumped on how to make the different urls all end up on the same index.html page regardless of the url without individual redirects.
Where you are stuck (mapping multiple URLs to a single page) seems to have very little to do with Firestore, but mostly depends on the provider where you host your HTML pages.
If you're using Firebase Hosting, have a look at how to configure rewrites. For example, to map all URLs to the same index.html, that documentation shows this example:
"hosting": {
// ...
// Serves index.html for requests to files or directories that do not exist
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]
}