Great question, but to answer that, we dug up the Zend Framework source code and initially returned by 2007, the _formatName() function was specifically designed to remove such anomalies from the URL name. Maybe it was before that, but I donβt know that.
This particular snippet is from Zend Framework 0.1.4 (Historic Right?) :)
protected function _formatName($unformatted) { $unformatted = str_replace(array('-', '_', '.'), ' ', strtolower($unformatted)); $unformatted = preg_replace('[^a-z0-9 ]', '', $unformatted); return str_replace(' ', '', ucwords($unformatted)); }
Here you see - , _ and . in the first step.
Even today, this feature is set to uninstall - and . but not _
Here is the current version of Zend Framework 1.x of this feature
protected function _formatName($unformatted, $isAction = false) { // preserve directories if (!$isAction) { $segments = explode($this->getPathDelimiter(), $unformatted); } else { $segments = (array) $unformatted; } foreach ($segments as $key => $segment) { $segment = str_replace($this->getWordDelimiter(), ' ', strtolower($segment)); $segment = preg_replace('/[^a-z0-9 ]/', '', $segment); $segments[$key] = str_replace(' ', '', ucwords($segment)); } return implode('_', $segments); }
As before the URI segment is cleared on this line
$segment = str_replace($this->getWordDelimiter(), ' ', strtolower($segment));
The getWordDelimeter() function returns an array('-', '.'); [line] thereby deleting them primarily in the URL that answers your first question . About the second question, you can change this line and remove from it . .
protected $_wordDelimiter = array('-', '.');
After this, Despatcher will no longer find the controller or any component of the URI with . On him.