使用 web.config 重定向 Azure Web App 中的特定文件

问题描述 投票:0回答:0

我有一个运行 ASP.NET MVC(非核心)的 Azure Web 应用程序。它前面没有应用程序网关。我需要重定向特定文件。为了这个问题,让我们调用位于应用程序文件夹根目录中的文件abc.txt。我想使用 web.config 将对 abc.txt 文件的请求重定向到 https://mytestsite.com/abc.txt。我尝试过 rewritemaps 和许多其他使用 web.config 重定向的尝试,但都无济于事。任何帮助表示赞赏。

在 web.config 中使用的任何尝试都失败,导致 500 错误。

asp.net asp.net-mvc url-rewriting web-config
© www.soinside.com 2019 - 2024. All rights reserved.