Key_Master - 7:56 pm on Apr 19, 2013 (gmt 0)
I'm not sure I fully understand your question, but I'll throw a couple of different options at you. On most servers, you can get the redirected document_name (or any other server variable) by prepending the variable with "REDIRECT_". E.g., REDIRECT_DOCUMENT_NAME. If that's not present, you can try setting (and reading) a unique environmental variable in your PHP script. That would be a little safer and easier to code for than using a query string parameter.