Now 2 regex's get created for matching:
The first one fails, but going to /1 works. Obviously neither of these are solutions. All my other routes work fine. Using nginx rule:
rewrite ^.*$ /index.php;
I think a better solution when $url_prefix == pattern is to use a place-holder string like '<front>' (Drupal uses this to denote links to front page). This way it's clear we are matching 'nothing' and just want a front page handler.