如何在仅目录路径和文件路径的情况下配置 ProxyPass

How can I configure ProxyPass in the case of both directory path only and with file path

我想要的是像下面这样的重定向配置。

https://example.com/abc => https://test.com
https://example.com/abc/test.html => https://test.com/abc/test.html

我正在尝试这样做,但还没有成功。

ProxyPassMatch ^/abc/$ https://test.com
ProxyPass /abc https://test.com/abc

任何帮助将不胜感激。

对于初学者,您很可能需要(注意斜杠):

ProxyPassMatch ^/abc$ https://test.com
ProxyPass /abc/ https://test.com/abc/

涵盖您正在解释的用例。