URL Shortener App

I have read the discussion about sharerenamer. But this is not really what I am looking for. I would appreciate to shorten the URL of a ressource by using my NCs domain name, regardless where the ressource is being located. E.g., I have just found a ressource with an 131 character URL. I want to make aware a friend on this ressource. So I want to shorten the URL to www.mydomain.tld/shorturl/some_random_characters.

I could imagine, such app could be part of a bookmarking app and create to a bookmark saved on NC an unique short URL.

I think, when the domain of such short URL is a trustworthy domain, there is no danger of making people frivolous in clicking/tipping on each unknown short URL.

So, do somebody here know an app providing short URL service for NC.

I have wrote a php url rewrite but can only be used on additional webserver and not in Nextcloud. Send me a PN if you need it hosted outside Nextcloud.