During the process of adding some rewrite rules, I am running into problem which might to be caused by different apache versions providing different values to PHP which are exposed to the PHP script via $_SERVER. Or it might be something else entirely.
One version is apache 2.2.4 running in a Windows XP VM, and the other is and apache 2.2.22 running on a Mac. Both are development systems.
I originally verified that after redirecting and rewriting, that the value of request which is stored in $_SERVER['REQUEST_URI'] would going to be what I expected: namely, the value of the original URL provided by the browser. And in fact on the apache 2.2.4 instance that is the case.
However, on the 2.2.22 instance, the value is the redirected URL. Naturally, this is has caused a lot of trouble!
I have carefully provided (nearly) identical rewrite rules and the identical PHP test script. So I am thinking it is neither the rules nor the code. I say "nearly" identical because the redirect rule includes the protocol and host on the redirect, and they are appropriate for each server, and thus differ.
I am writing this question in the hope that someone can shed light on the problem. That is, could it really be a different in the behavior of apache? Or is there some other setting that I am missing?
For both servers, the rewrite rules are set in httpd-vhosts.conf, not in .htaccess. And FollowSymLinks is set for both hosts.
My workaround for this behavior will be to add some PHP code to compensate. But I would like to know the root cause so a better solution can be applied.
Any guidance is appreciated.