Hide Azure Blob Url

て烟熏妆下的殇ゞ 提交于 2019-12-01 12:03:38

I found a Microsoft Hands-on Lab where they recommend the web.config URL rewrite rule option:

Hands on Lab: Maintainable Azure Websites: Managing Change and Scale (July 16, 2014)

(Code Snippet - WebSitesInProduction - Ex4 - UrlRewriteRule)

<system.webServer>
    <rewrite>
        <rules>
            <rule name="redirect-images" stopProcessing="true">
                <match url="img/(.*)"/>
                <action type="Redirect" url="http://[YOUR-STORAGE-ACCOUNT].blob.core.windows.net/images/{R:1}"></action>
            </rule>
        </rules>
    </rewrite>

"Note: URL rewriting is the process of intercepting an incoming Web request and redirecting the request to a different resource. The URL rewriting rules tells the rewriting engine when a request needs to be redirected, and where should they be redirected. A rewriting rule is composed of two strings: the pattern to look for in the requested URL (usually, using regular expressions), and the string to replace the pattern with, if found. For more information, see URL Rewriting in ASP.NET."

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!