homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

php find page redirected from

 1:55 am on Dec 15, 2008 (gmt 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) {

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

or something similar, you get the point.



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

nvm i found another solution


 2:04 pm on Dec 15, 2008 (gmt 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?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved