Routing match everything i want to match in a route a 'random' URL with a random sub path, fox example:


/example/1/a/b/c
/example/c3/s
...


i implement this route in my .routing.yml file 

modulo.validator:
  path: '/example/{path}'
  defaults:
    _controller: '\Drupal\modulo\Controller\Controller::check'
  requirements:
    _permission: 'TRUE'
    path: '.+'


I write it following Symfony2 standard but it doesn't works, seems Drupal override requirements in path. 

Take look to system.routing.yml

system.private_file_download:
  path: '/system/files/{filepath}'
  defaults:
    _controller: 'Drupal\system\FileDownloadController::download'
  requirements:
    # Permissive regex to allow slashes in filepath see
    # http://symfony.com/doc/current/cookbook/routing/slash_in_parameter.html
    filepath: .+
    _access: 'TRUE'


why this doesn't work for me?

Any suggestion?
The reason that the route in system.routing.yml works is that it gets help by an inbound path processor service, which stores the filepath to a query parameter in the request:

PathProcessorFiles.php

&lt;?php

namespace Drupal\system\PathProcessor;

use Drupal\Core\PathProcessor\InboundPathProcessorInterface;
use Symfony\Component\HttpFoundation\Request;

/**
 * Defines a path processor to rewrite file URLs.
 *
 * As the route system does not allow arbitrary amount of parameters convert
 * the file path to a query parameter on the request.
 */
class PathProcessorFiles implements InboundPathProcessorInterface {

  /**
   * {@inheritdoc}
   */
  public function processInbound($path, Request $request) {
    if (strpos($path, '/system/files/') === 0 &amp;&amp; !$request-&gt;query-&gt;has('file')) {
      $file_path = preg_replace('|^\/system\/files\/|', '', $path);
      $request-&gt;query-&gt;set('file', $file_path);
      return '/system/files';
    }
    return $path;
  }

}


This service is registered in system.services.yml:

system.services.yml

  services:

    path_processor.files:
      class: Drupal\system\PathProcessor\PathProcessorFiles
      tags:
        - { name: path_processor_inbound, priority: 200 }


And the controller gets the file path from the query parameter added by the processor:

FileDownloadController.php

  public function download(Request $request, $scheme = 'private') {
    $target = $request-&gt;query-&gt;get('file');
    ...


You can implement the same approach for your route to match everything after /example/.