I have created a page:
http://mypage.com/paypal
with a custom template that contains the code to grab the ipn response from paypal etc.
Now, I need to redirect users accidentally or on a purpose access
http://mypage.com/paypal
I want to allow that to only when a user is redirected from paypal url. e.g. if it contains http://paypal.com
or https://paypal.com
then it's ok, but all other access redirect to WP homepage.
How to do that?