Given a simple page created in Servicenow with the following config:
Name: My Page
Url Suffix: my-page
Layout: foo
Inside of foo, I am loading in a single page application, with various routes such as /invoice/1, invoice/2, user/1, user/2 and so forth.
I am using react router
for this routing, and although it loosely supports hash routing, it's clear that its considered for "old browsers". And as of 2.4.1
it seems that having _key=
present is a requirement.
Anyway, ideally, I don't want to abuse hashbangs to describe a route, instead using the more typical url structure.
Current:
instance.servicenow/my-page#/invoice/1
Preferred:
instance.servicenow/my-page/invoice/1
This would require SN to know that anything deeper than my-page
should redirect to my-page. I come from an apache world, in which case I would just write the following:
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule ^ /index.html [L]