我創建了兩個網站(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