Welcome to WebmasterWorld Guest from 54.196.217.43

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

php find page redirected from

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

Junior Member

5+ Year Member

joined:Feb 6, 2008
posts:94
votes: 0


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) {
//code
}

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

or something similar, you get the point.

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

Junior Member

5+ Year Member

joined:Feb 6, 2008
posts:94
votes: 0


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

Administrator

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

joined:July 31, 2003
posts:12533
votes: 0


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?