PHP/Apache REQUEST_URI different behaviour?

半腔热情 提交于 2020-01-02 09:09:51

问题


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.

Some of my scripts ,including Wordpress, are behaving incorrectly. It turns out the issue is the difference between the REQUEST_URI global:

On the older server: REQUEST_URI = /phpinfo.php
On the new server: REQUEST_URI = http://www.example.com/phpinfo.php

I have changed my own code to accommodate either variant but don't really want to do it for Wordpress etc.

What do I need to do in apache/php to make REQUEST_URI behave as per the old server?


回答1:


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).



来源:https://stackoverflow.com/questions/2097060/php-apache-request-uri-different-behaviour

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!