我正在设置IIS 7.5来为我的站点的子目录执行反向代理.
这是web.config url-rewrite:
<clear />
<rule name="Reverse Proxy to Community" stopProcessing="true">
<match url="^community/qa/(.*)" />
<action type="Rewrite" url="http://xxx.xxx.xxx.xxx/{R:1}" logRewrittenUrl="true" />
</rule>
Run Code Online (Sandbox Code Playgroud)
ip地址指向一个带有apache和django站点的联网linux盒子.
我想要的
所有请求/ community/qa/*被重定向到指定的内部IP.
会发生什么
/ community/qa/ - 给出404(在主IIS服务器上)
/ community/qa/questions/ - 给出404(在主IIS服务器上)
- 但是 -
/ community/qa/questions/ask/Works !!!
/ community/qa/questions/unanswered/Works !!
所以它似乎适用于从起点开始的2个子目录的所有URL.
这对我来说似乎很奇怪,我无法弄明白.
在此先感谢您的帮助.