private function fetchRouteRules()
    {

        # User defined routes.
        $this->route_config = require_once ROOT . 'config' . DSC . 'routes.php';

        # Route placeholder and their regex.
        $regex = array(
            '(:string)' => "([a-zA-Z0-9-_.]+)",
            '(:int)' => "([0-9]+)"
        );

        # Iterate over and preparing regex route rules.
        foreach ($this->route_config['rule'] as $rule => $value)
        {
            $new_rule = array();
            foreach (explode('/', $rule) as $split)
            {
                if (array_key_exists($split, $regex))
                {
                    $new_rule[] = str_replace($split, $regex[$split], $split);
                }
                else
                {
                    $new_rule[] = preg_quote($split);
                }
            }
            $this->route_rules[implode(preg_quote('/'), $new_rule)] = $value;
        }
    }