Look for URI then reject if from external network

Looking to build an iRule that will look for a specific word in a URI and then when it finds that - to reject if it comes from the internet and not from our internal networks. I’ve seen the separate examples, but wondering how you two 2 steps together. Thanks-

Found the answer in another thread: