我有一个要重定向到我的域的子域,假设subdomain.example.com
是我的子域,并且当用户输入该域名时,我想将此域重定向到example.com
,但其他路径不应该,像subdomain.example.com/path
。我如何在apache2的虚拟主机中实现此目的。我尝试添加此
# ProxyPass /* http://localhost:8080/mySecondApp/
# proxyPassReverse /* http://localhost:8080/mySecondApp/
但它不起作用
这是我的虚拟主机
<VirtualHost *:443>
JKMount /* ajp13_worker
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:8080/myApp/
proxyPassReverse / http://localhost:8080/myApp/
# ProxyPass /* http://localhost:8080/mySecondApp/
# proxyPassReverse /* http://localhost:8080/mySecondApp/
#other configs...
</VirtualHost>