I’m currently creating a single page app in a subfolder of my site. It contains a couple of accordion panels which, when toggled, change the url from i.e
Now, obviously, when the user refreshes the page,
website.test/spa/entry-one is not found on the server, so I want to redirect to
website.test/spa, while keeping the url intact so I can retrieve & use the uid in a function to toggle the corresponding panel.
I’ve found some semi helpful stuff online, but nevertheless wanted to ask if there might be a Kirby-specific solution for this. Should I try and redirect using htaccess (which I am utterly illiterate in), or write a php function on page load? And what would that look like?
Any hints greatly appreciated!