
<rule name="MyRule"> <match url="*" /> <action type="Rewrite" url="/index.HTML" /></rule>
我有没有任何选择,因为我不能RDP进入机器并摆弄IIS?这不是一个ASP.Net网站,它是一个简单的SPA应用程序.
解决方法 您需要在wwwroot文件夹中创建一个web.config文件,并在其中放置相关的配置条目.这是一个web.config规则的示例,可以让您了解它应该是什么样子.
以下示例将默认的* .azurewebsites.net域重定向到自定义域(通过http://zainrizvi.io/2016/04/07/block-default-azure-websites-domain)
<configuration> <system.webServer> <rewrite> <rules> <rule name="Redirect rquests to default azure websites domain" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouPing="MatchAny"> <add input="{http_HOST}" pattern="^yoursite\.azurewebsites\.net$" /> </conditions> <action type="Redirect" url="http://www.yoursite.com/{R:0}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> 总结 以上是内存溢出为你收集整理的重写Azure Web应用程序中的URL全部内容,希望文章能够帮你解决重写Azure Web应用程序中的URL所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)