Filter Web Traffic in Apps, Not Safari

Greetings - I’m relatively new to programming, and I’m looking to solve this specific problem: I would like to filter web traffic in Safari Views differently than in Safari itself. For instance, if a user click on “Website” in Apple Maps for Google, I would like the ability to filter or block “about.google” in the in-app browser, but allow it in Safari. What means would you use to accomplish that?

Thanks.