Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I can reconstruct the actual URL post rewrite rule, but is there a way for me to get the URL pre rewrite rule?

Also, when I run php in IIS 7.5, and have rewrite rules in my web.config, how do I get the pre rewrite URL in my php?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In Apache, the pre-rewritten URL is available in a server variable $_SERVER['REQUEST_URI'].

share|improve this answer
Cool, just tested it, works in apache httpd and iis 7.5. – Robert Louis Murphy Jul 19 '12 at 11:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.