0
我在ubuntu 14.04上設置了apache2和tomcat7。從www.example.com重定向到www.example.com/index.jsp
我的域名是www.example.com,我想將它重定向到www.example.com/index.jsp到tomcat上,因爲這是登錄頁面。如何才能做到這一點?該設置適用於向www.example.com/index.jsp發出的請求。 apache virtualhost的設置是
ProxyPass/ajp://localhost:8009/
ProxyPassReverse/ajp://localhost:8009/
在我理解中的重定向應該發生在apache上。由於apache只是作爲代理來運行,而不是自己提供任何請求,我們可以使用該指令嗎?在哪裏以及如何進行更改。任何指針讚賞
我試圖改寫在虛擬主機的URL,但它似乎並不奏效
ServerName www.example.com <br>
RewriteEngine On <br>
RewriteRule ^http://www\.example\.com$ https://www.example.com/index.jsp [R]
謝謝!這解決了這個問題,男孩不是很簡單! :) – Tech