简体   繁体   English

IIS URL重写文件夹到另一个Web服务器

[英]IIS URL Rewrite for a folder to another web server

I have an IIS webserver running a website. 我有一个运行网站的IIS网络服务器。 I've installed ARR3 to enable routing rules. 我已经安装了ARR3以启用路由规则。

I'd like to redirect all the incoming request for the URL .mydomain/url2redirect/ to an Apache server installed on the same machine where is running SVN. 我想将URL .mydomain / url2redirect /的所有传入请求重定向到安装有运行SVN的同一台计算机上的Apache服务器。

So in the inbound rule definition I've inserted the following: 因此,在入站规则定义中,我插入了以下内容:

  • Input: URL path after '/' 输入:“ /”后的URL路径
  • Pattern: *.mydomain/url2redirect/* 模式:*。mydomain / url2redirect / *
  • Action Type: Rewrite 动作类型:重写
  • Action URL: https://ip-address:8080/ {R:2} 动作网址: https:// ip-address:8080 / {R:2}

By testing the pattern, I get the desired result, and in the R:2 back reference I get the requested page I need to pass to SVN, but I get always a 404. 通过测试模式,我得到了期望的结果,并且在R:2反向引用中,我得到了需要传递给SVN的请求页面,但是我总是得到404。

"url2redirect" doesn't exist but it should captured by the URL rewrite and forwarded to the Action URL. “ url2redirect”不存在,但应该由重写的URL捕获并转发到操作URL。

I've added any outbound rule. 我添加了所有出站规则。 Should I have to add something? 我应该添加一些东西吗? what? 什么?

I've tried also to add a Reverse Proxy Rule, using the ARR template but, it's completely ignored, therefore I think that the routing is not working at all on IIS. 我也尝试过使用ARR模板添加反向代理规则,但是,它被完全忽略了,因此我认为路由在IIS上根本不起作用。

As far as I know, the url rewrite rule Pattern doesn't match the domain part. 据我所知,URL重写规则Pattern与域部分不匹配。

That means mydomain will not include in the Pattern. 这意味着mydomain将不包含在模式中。

If you want to match the url2redirect, you should use below pattern. 如果要匹配url2redirect,则应使用以下模式。

url2redirect(.*)

Then I suggest you could modify your action url as below: 然后,我建议您可以如下修改操作网址:

 https://ip-address:8080{R:1}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM