我有一個要求,我必須將我的主機名重定向到同一個Apache上託管的特定應用程序。舉個例子,當我點擊主機(https://domain1.example.com)時,它應該在內部將我重定向到Apache Web應用程序(https://domain1.example.com/application1),而不更改瀏覽器URL。在同一個Apache中重定向https到https
我不知道如何實現SSL到SSL重定向。提前致謝..!!!
我有一個要求,我必須將我的主機名重定向到同一個Apache上託管的特定應用程序。舉個例子,當我點擊主機(https://domain1.example.com)時,它應該在內部將我重定向到Apache Web應用程序(https://domain1.example.com/application1),而不更改瀏覽器URL。在同一個Apache中重定向https到https
我不知道如何實現SSL到SSL重定向。提前致謝..!!!
這應該工作。這將重定向要domain1.example.com/所有傳入的URL domain1.example.com/application1
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain1.example.com$
RewriteRule ^$ https://domain1.example.com/application1 [L,R=301]
如果不改變瀏覽網址是你的目標,然後PROXY是你的方式。
放在你的Apache虛擬主機或全局文件之後,
ProxyPass https://domain1.example.com/ https://domain1.example.com/application1
ProxyPassReverse https://domain1.example.com/ https://domain1.example.com/application1
PS陳詞濫調無關這一點,至少你沒有提到的任何情況。
編輯
ProxyPass
應該來virtural主機不location
地全部location
標籤應該出的virtual host
的
我不明白你爲什麼需要有陳詞濫調! – Akshay
,僅限註冊用戶可以訪問該應用程序。 – Waheed
什麼是SSL所要做的有了這個,如果你只想要一個_internal_重定向? – CBroe
我有一個應用程序,我在DocumentRoot PATH_TO_APP中設置,我希望所有主機都應該指向同一應用程序,即domain1.example.com或domain2.example.com或domainN.example.com應該能夠訪問我的應用程序(域.example.com).. – Waheed
這仍然不能解釋什麼SSL/HTTPS可以做到這一點 - 如果你的重定向只是_internal_。 – CBroe