@beee thanks for the quick reply, pastebin link is great. What was the issue with it redirecting at first for you which was solved through the linked file, not building the url properly? I’ve tried adapting the link you provided to rewrite the permalink on my site, but seem to be struggling.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users