Thanks for your time.
I am developing application using PHP. In this for some instace I have added logic such that, for certain area matches then redirect to particular url.
if(//statement) {
redirect to specific URL(e.g. http://www.example.com/testing.php )
}
Above is my basic logic. Here I want to Identify that whether user mannually loaded this URL http://www.example.com/testing.php on browser or it is redirected from webserver and then loaded.
How do I achieve this.
Your suggestions are welcome!!!.
-Pravin.
HTTP as a protocol does not include the facility to differentiate how a URL was accessed or what exactly the user did in the browser. A URL request is a URL request, it shouldn’t matter whether the user clicked a link, refreshed the page or typed in the URL.
There are indicators that may or may not signal certain behavior (e.g. the Referer header), but they’re not reliable, they’re not meant for this purpose and they may introduce weird behavior in edge cases if you rely on them.
Please be aware of this whenever you try to implement something like this.
Better, you should architect your application to not rely on RESTless behavior like this.