I\'m currently working on an internal RESTful API, and I\'m using our main domain name as an environment identifier. However, I noticed that Slim
I would give a try to slim's Route Conditions. You should be able to specify something like this to allow dots in your parameter:
$app->get('/:domain/:id', function($domain, $id) {
echo $domain . ' ' . $id;
})->conditions(array('domain' => '[a-zA-Z\.]+'));
If this does not work, you should think on using another character instead of a dot to separate the domain name from the TLD and then replace it in the function:
$app->get('/:domain/:id', function($domain, $id) {
$domain = str_replace('_', '.', $domain);
echo $domain . ' ' . $id;
})->conditions(array('domain' => '[a-zA-Z_]+'));
It is not so elegant, but it works.