提供来自不同域的内容

时间:2019-07-03 16:26:40

标签: asp.net iis webforms azure-storage

我们正在将物理文件服务器移至云存储,但是由于自定义域名限制,我们无法继续将当前域用于新的云存储。

请求时:

https://old-subdomain.old-website.com/old-directory/image.png

在从云存储位置提供内容时,是否可以在位置栏中从上方保留用户输入的URL?

https://new-subdomain.new-website.com/new-directory/image.png

我能够实现的最接近方法是使用IIS URL重写模块的重定向(无法使 rewrite 正常工作),但这并不能保留原始网址:

<rule name="FileStorageRedirect" stopProcessing="true">
  <match url="^old-directory(.*)$" />
  <conditions>
    <add input="{HTTP_HOST}" pattern="^old-subdomain.old-website.com$" />
  </conditions>
  <action type="Redirect" url="https://new-subdomain.new-website.com/new-directory{R:1}" />
</rule>

如果可以按照我的要求进行操作,则解决方案不必局限于使用IIS URL重写模块。我愿意接受所有解决方案。

0 个答案:

没有答案
相关问题