An Amazon Linux 2 instance is using Apache to host an Angular 7 app. The Angular 7 app includes not just index.html, but also several .js files and a subdirectory named assets.
What specific syntax do I need to use in order to ensure that requests to Apache for all non-specified routes get redirected to the
index.htmllocated in theDocumentRoot? Note that the required syntax needs to also allow all the.jsfiles and the contents of theassetsdirectory to be served as secondary requests when the client browsers are loadingindex.html.
For example, if a remote web browser requests mydomain.com/randomCharacters, I want Apache to return index.html the same way that Apache would respond to a request to mydomain.com with index.html. And then index.html must be able to get access to the .js files and the contents of the assets subdirectory.
<VirtualHost *:80>
ServerName www.mydomain.com
ServerAlias mydomain.com
DocumentRoot /var/www/mydomain.com/public_html
ErrorLog /var/www/mydomain.com/error.log
CustomLog /var/www/mydomain.com/requests.log combined
RedirectMatch "What goes302 here^/(?"!index.html$).+ http://mydomain.com
</VirtualHost>
**First Attempt**Forensic Analysis of Results**Second Attempt:**
ThenAlso, when