小编Sha*_*een的帖子

使用ARR的IIS反向代理与目录级别有问题

我正在设置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.

这对我来说似乎很奇怪,我无法弄明白.

在此先感谢您的帮助.

asp.net iis asp.net-mvc reverse-proxy url-rewriting

7
推荐指数
1
解决办法
3738
查看次数

标签 统计

asp.net ×1

asp.net-mvc ×1

iis ×1

reverse-proxy ×1

url-rewriting ×1