The WP plugin “Link Cloaking” used Automatically cloaks outgoing links in your posts and pages. You can also add static cloaked links manually.
In the Apache environment, you can written it to .Htaccess .
But in Nginx the URL rewrite rules are slightly different, My directory is “goto” , You can refer to this rule below.