Single Page App Redirect to Same Page

#1
I built a php single page app with extensive routing.

On the page "https://somesite.com", there are public links such as "https://somesite.com/page-01/". (I have about 30 links to other pseudo "directories")

Clicking on this public link needs to return to the same page with the directory string intact as the string is parsed to run the correct route.

Right now, clicking on a link throws a 404.

I've tried all kinds of ways using rewrite without success, both with htaccess and static context inside the VH. Including using "FallbackResource /index.php"

I have no problem getting this to work in nginx, but can't seem to make it work in OLS.

Note that I have physical directories for /admin/ and pages contained therein that work fine.
 
#3
If I append the index.php on the end of the url, the page redirects to the home page /index.php, not the pseudo directory.

Go here to see how it works: https://greatopeninglines.com/ Click on the faq link, a pseudo directory. Returns the correct route (which is a route inside the /index.php page.

This site is presently on nginx, which I need to move to ols.

Tried this htaccess doesn't work
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
 
Top