I’ve searched and searched google for an answer but could not find one.
I need a PHP script or javascript ( PHP would be better but i don’t mind ) to detect if a page is being loaded from SERVERIP/page.php or SERVERDOMAIN.com/page.php.
I have the server IP that does not cache the pages, And i have the domain that caches the pages. I want to make sure that if the page is being loaded from SERVERDOMAIN it gets redirected to SERVERIP so it does not get the cached page.
Example.
I go to SERVERDOMAIN for one page i get the cached page, I then go to another page that does not need to be cached so it gets redirected to SERVERIP.
See if
>$_SERVER['HTTP_REFERER']works for you.