PHP / Apache的REQUEST_URI不同的行为? [英] PHP/Apache REQUEST_URI different behaviour?
问题描述
我正从一台服务器到另一个网站。两者都是在CentOS 5的x64与Apache 2.2和PHP 5.2.X类似的变种。
I am moving websites from one server to another. Both are on a similar variant of Centos 5 x64 with Apache 2.2 and PHP 5.2.X.
我的一些脚本,包括Word preSS的行为不正确。原来,问题是REQUEST_URI全球的区别是:
Some of my scripts including Wordpress are behaving incorrectly. It turns out the issue is the difference between the REQUEST_URI global:
在旧服务器:REQUEST_URI = /phpinfo.php结果
在新的服务器:REQUEST_URI = http://www.mydomain.com/phpinfo.php
On the older server: REQUEST_URI = /phpinfo.php
On the new server: REQUEST_URI = http://www.mydomain.com/phpinfo.php
我已经改变了我自己的code,以适应任何变量,但真的不希望这样做的Word preSS等。
I have changed my own code to accommodate either variant but don't really want to do it for Wordpress etc.
什么我需要在阿帕奇/ PHP做才能让REQUEST_URI表现为每旧服务器?
What do I need to do in apache/php to make REQUEST_URI behave as per the old server?
谢谢,
丹尼尔
推荐答案
在猜测,旧服务器使用默认的虚拟主机,而较新的服务器使用一个名为虚拟主机(尽管这可能是从后到前)正在处理请求
At a guess, the old server is processing the request using the default vhost while the newer server uses a named virtual host (although that could be back to front).
这篇关于PHP / Apache的REQUEST_URI不同的行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!