IIS URL 从另一个根服务器重写到目录

时间:2021-05-12 15:22:30

标签: iis url-rewriting

我有一个 npm 服务器来使用 ArcGIS Experience Builder ( https://developers.arcgis.com/experience-builder/ ) 开发一些应用程序。

我想将其部署在网络服务器上与同事共享环境。

在这台服务器中,我有 IIS,我想用它作为反向代理来访问它。

当我们启动 npm 服务器和客户端时,它可以通过 https::/localhost:3001/ 访问,但都在根文件夹中。

  • 访问页面位于:https://localhost:3001/page/set-portalurl,
  • 摘要位于 https://localhost:3001/
  • dev 在 https://localhost:3001/builder?...

我尝试添加此规则:

 <rule name="ArcGIS Experience" stopProcessing="true">
  <match url="^ArcgisExperience(\/?|(\/+.*))$" />
  <action type="Rewrite" url="https://localhost:3001{R:1}" logRewrittenUrl="true" />
 </rule>    

 <rule name="ArcGIS Experience" stopProcessing="true">
  <match url="^ArcgisExperience(\/?|(\/+.*))$" />
  <action type="Rewrite" url="https://localhost:3001/{R:1}" logRewrittenUrl="true" />
 </rule>    

但是当我转到 https://example.com/ArcgisExperience 时,我会自动重定向到 https://example.com/page/set-portalurl,这是 npm 服务器上的访问页面...我想要 https://example.com/ArcgisExperience/page/set-portalurl

我该怎么做?

0 个答案:

没有答案