Route from /some/link/with#anchor to /somewhere/else

Is it possible to route from a URL with an anchor to somewhere else?

Putting this in config.php doesn’t seem to work:

c::set('routes', array(
  array(
    'pattern' => '/my/awesome/url/with#anchor',
    'action'  => function() {
      go('/somewhere/else');
    }
  )
));

I’d use a placeholder and then check with regex:

c::set('routes', array(
  array(
    'pattern' => 'my/awesome/url/(:any)',
    'action'  => function($any) {
    // check with some regex voodoo if $any contains an anker and react on that
      go('/somewhere/else');
    }
  )
));

For now i changed my site structure a bit, so i won’t need it anymore, but i will probably try it out tomorrow. Thanks!

Anchors are always (afaik) stripped from http requests by the browser. They never get to the server and therefore could never reach the kirby router.