REQUEST_URI意外包含FQDN [英] REQUEST_URI unexpectedly contains FQDN

查看:153
本文介绍了REQUEST_URI意外包含FQDN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的主Web服务器,$ _ SERVER变量REQUEST_URI总是包含类似/filename.php但是我的开发服务器(PHP版本5.3.5-1ubuntu7.3,阿帕奇2.2.17)在同一个变量包含 http://www.example.com/filename.php(例如包括完全合格的域名不只是路径)。

On my main web server, the $_SERVER variable REQUEST_URI always contains something like "/filename.php" however on my development server (PHP Version 5.3.5-1ubuntu7.3, Apache 2.2.17) the same variable contains "http://www.example.com/filename.php" (e.g. includes the fully qualified domain name not just the path).

这是造成一些CMS包我(例如字preSS和Joomla)工作,这似乎依赖于REQUEST_URI的内容存在问题。

This is causing problems for several CMS packages I work with (e.g. Wordpress and Joomla) which seem to rely on the contents of REQUEST_URI.

有没有人有什么,我需要改变开发服务器上,使REQUEST_URI像预期的那样有什么建议?

Does anyone have any suggestions on what I need to change on the development server to make REQUEST_URI behave as expected?

推荐答案

使用代理和放大器; HTTP 1.1导致在Apache中REQUEST_URI变量完整的URL。 Web应用程序有试图与主机concatinate它(这个bug在Word preSS CMS存在为例)之前测试REQUEST_URI。

Using proxy & HTTP 1.1 leads to full URL in REQUEST_URI variable in Apache. Web applications have to test REQUEST_URI before trying to concatinate it with host (this bug exists in Wordpress CMS for example).

这篇关于REQUEST_URI意外包含FQDN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆