2017-08-10 120 views
-3

所以,我成立了一个 “门户” 的应用程序目录在Azure如下: enter image description hereAzure的虚拟应用程序

有根一个WordPress站点:

https://mwren-test.azurewebsites.net

而一个ASP。在门户网站的虚拟目录.NET应用程序:

https://mwren-test.azurewebsites.net/portal/

但是,如果您查看门户链接,则找不到该目录下的任何支持文件,因此没有样式,然后单击诸如“about”之类的链接会将您带到未从wordpress网站找到的页面。换句话说,任何入口/ *请求仍然由wordpress网站处理。如何获取asp.net应用程序以处理Azure上的所有门户/ *请求?

非常感谢

回答

0

我解决了这个利用捻控制台:

    这是在顶部 Debug Console通过 {yoursite}.scm.azurewebsites.net
  1. 选择访问从菜单
  2. 打开捻控制台,然后Powershell
  3. 导航至site\wwwroot并点击编辑图标web.config
  4. 更新web.config文件以包括/portal/*例外,如下面所示:

    <?xml version="1.0" encoding="UTF-8"?> 
    <configuration> 
        <system.webServer> 
        <rewrite> 
         <rules> 
          <rule name="WordPress: http://{yoursite}.azurewebsites.net" patternSyntax="Wildcard"> 
           <match url="*"/> 
            <conditions> 
             <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> 
             <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> 
             <add input="{REQUEST_URI}" pattern="/portal/*" negate="true" /> 
            </conditions> 
           <action type="Rewrite" url="index.php"/> 
          </rule> 
         </rules> 
        </rewrite> 
        </system.webServer> 
    </configuration> 
    
相关问题