Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

php find page redirected from

1:55 am on Dec 15, 2008 (gmt 0)

5+ Year Member

hey, i have no clue how to start this one. i need to know how to find the url of the page that i redirected to. what i want, is have a page, and if you dont have enough permissions to view the page, you get redirected to a different page that displays what the error is. the page is going to display different errors for each situation. so im going to do something like:

function redirectedFrom($url) {

if(redirectedFrom($url) == $url2) {
echo "error message1";

or something similar, you get the point.

3:54 am on Dec 15, 2008 (gmt 0)

5+ Year Member

nvm i found another solution
2:04 pm on Dec 15, 2008 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

It's like anything else though with a stateless protocol like HTTP, you have to "carry" the value along one way or another. Each request is a brand new request so to retain the state of the last conversation you must pass values through cookies, the GET query, sessions, etc.

Which method did you employ?