我在 apache web 服务器上有一个网站,我希望子文件夹之一透明地重定向到 azure web 应用程序。
- mydomain.org -> 常规 apache 页面
- mydomain.org/something -> 常规 apache 页面
- mydomain.org/azure -> 重定向到 azure
但是,我需要将 url 保留在 mydomain.org 上,所以我想 - 例如 mydomain.com/azure/x/y 实际显示 azuredomain.org/x/y 的结果
我相信我可以使用带有规则的 .htaccess 来做到这一点:RewriteRule ^(.*)$ azuredomain.org/$1 [P]
但是,这会导致 azure 404 错误,提示可能“自定义域尚未在 Azure 中配置”,这实际上是正确的。
是否可以将“mydomain.org”配置为 azure 中的自定义域,但仅限于一个子文件夹(mydomain.org /azure/),同时允许所有其他 url 映射到 apache 服务器?