How do you prevent a page that is normally loaded through ajax to be loaded on its own? If for example in main.php you load via ajax “cart.php” and parse it to a local div. Would it be possible when an user attempts to directly load cart.php, the user is redirected to main.php instead?
–comment: javascript is not an option
You can detect if the page is loaded via ajax like this: