Router preg_match(): getting error | v3.5.7.1

[
  'pattern' => 'other/Main#!/(:all)',
  'action'  => function($all) {
	return go('https://www.test.com/other/'.$all, 301);
  }
],


I’m having trouble redirecting. How can I solve it?

What exactly are you trying to match here?

There is a special character in the link I will redirect.

Exactly what I want to do;

localhost/other/Main#!/EN / is coming from out link.
https://www.test.com/other/EN

Could you try to escape special characters like that: other/Main\#\!/(:all)

I think the problem here is that everything after the # is ignored because regarded as parameters.

At least I don’t get it to work with the escapes…

The problem here is only the #. Because you are using # as delimiter pair, the # inside the pattern has to be escaped: \#

If this route fails, I’d create a rewrite rule in .htaccess