如果app.js位于子目录中,则web.config文件不起作用 [英] web.config file does not work if app.js is inside a subdirectory
问题描述
这是我App.js的位置-D:\ home \ site \ wwwroot \ frontend \ src \ App.js
Hi, this is the location of my App.js - D:\home\site\wwwroot\frontend\src\App.js
web.config无法找到它.我尝试将路径更改为"frontend \ src \ App.js"但这不起作用.
web.config is not able to locate it. I tried changing the path to "frontend\src\App.js " but it doesn't work.
你能帮我吗?
此致
Julian
推荐答案
您可以通过重定向web.config来查找与URL匹配的子目录来解决此问题.这样的规则:
You can solve this by redirecting your web.config to find the subdirectory with URL matching. A rule like this:
<match url="frontend/src" />
<action type="Rewrite" url="frontend/src/App.js" />
您还可以将该子目录添加为虚拟应用程序,并将web.config直接放在其中.你可以在底部做
门户中的应用程序设置.
You could also add that subdirectory as a Virtual Application and put a web.config directly inside of it. You can do that on the bottom of
Application Settings in the Portal.
这篇关于如果app.js位于子目录中,则web.config文件不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!