我创建了两个网站(http://localhost/webone,http://localhost/webtwo)。ProxyPass&ProxyPassReverse - 从浏览器地址栏获取原始网址
网的两个具有URL是这样的:http://localhost/webtwo/webone(使用的ProxyPass和ProxyPassReverse)
如果我们去上面的网址,该网页一个的是显示内容。 。
现在,如果有人访问网站之一,那么我要赶用户访问的URL(这可能是 http://localhost/webone或http://localhost/webtwo/webone)
我的问题是:
如果有人访问网页两名http://localhost/webtwo/webone URL。然后,如果我执行以下代码,则返回http://localhost/webone。
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
但浏览器显示的URL是http://localhost/webtwo/webone。有人可以请建议一种方法来赶上http://localhost/webtwo/webone的URL。
你使用会话来存储路径? –
尝试'$ _SERVER [SCRIPT_NAME]' –
@JeffPuckettII不工作 – user3099298