We have a requirement to internally redirect, so when an users access the old page hierarchy they view data a new page hierarchy in the SPA. This would ensure that the Old URLs does not need to be updated with the new page URLs and continue using Old URLs.
In traditional AEM implementations, we achieve this by configuring internal redirects in the dispatcher, as shown below:
RewriteRule ^/old-sample-page/([a-zA-Z0-9-]+).html /content/new-sample-page/$1.html [PT,L]
However, when we try the same logic for the SPA, the pages appear blank even though the redirects work fine. The rules used are as follows:
RewriteRule ^/old-sample-page/([a-zA-Z0-9-]+).html /content/new-sample-page/$1.html [PT,L]
RewriteRule ^/old-sample-page/([a-zA-Z0-9-]+).model.json /content/new-sample-page/$1.model.json [PT,L]
Do we need to make any other changes in dispatcher or SPA routing?