I've searched and searched for info on regex backreferences in Craft's route.php file to no avail.
I have a URL structure required by the client along the lines of:
/ [state] / [section] / region / [region]
so for examples:
/ hawaii / hotels / region / oahu / hawaii / retaurants / region / oahu / hawaii / hotels / region / maui
The "hotels" and "restaurants" are each their own Section (Channels) and require their own templates.
Given the above URL examples, I've created template directories:
I can manage the routes if I spell them all out. But what I'd like to do is use regex backreferences in the target templates. Tried but it fails. tried something like the following:
'hawaii/(.*)/region' => '\1/region'
The '\1' backreference doesn't catch the first group of either "hotels" or "restaurants."
Is it simply not possible to use backrefs in the target route templates...or is my syntax not correct for Craft?