I have a flask app that redirects to a php site on an Apache server. I don't have much experience with php. The flask app is at mysite.xyz and the php site is at mysite.xyz/page1. I would like to deny access to anyone going to mysite.xyz/page1 unless they are coming from mysite.xyz. Something along the lines of:
if not coming from 'mysite.xyz':
redirect to 'mysite.xyz'
else:
pass
Except at the beginning of my php and in php.