Redirecting SEO URL with oxid functions

Hello everyone.

I am trying that when someone opens this link: www.example.com/invite/1234randomhashtag

Will be redirected to:

www.example.cloud/index.php?cl=register_new_user&fnc=register&hash=1234randomhashtag

Now this can easily be done with the PHP header. However I have also found the OxUtilsUrl class. Is it even possible to do this with this class? Does it help?

In case someone is interested.