Here is my default home page:
The Microflow Timer calls this nanoflow which looks for a specific URL (custom domain) that was used to navigate to the app:
We used this to show a different page to users who arrived via a specific custom domain.
I realize this is not exactly what you are trying to accomplish, but thought it might give you a starting point.
Hope that helps,
// BEGIN USER CODE
var userAgent = window.navigator.userAgent;
// END USER CODE
This gives me exactly the information I need to check if the visitor is a search bot and then redirect it to the HTML files.