Create an Irule for allow traffic only from redirection

Hi All,

I have an APM weblink redirecting to specefic URL. This webtop and url are accessible from internet. I want to block the direct access to that url from internet and allow only traffic which is redirecting from APM webtop. How to do that?