【发布时间】:2010-10-28 23:27:42
【问题描述】:
如何重定向程序以连接到不同的 URL。
我看了这个帖子:Is it possible to redirect a url to another using a webproxy ( such as fiddler )
我在机器上安装了fidller,并将这段代码放在onBeforeResponse方法中的自定义规则中
oSession.utilDecodeResponse();
var oBody =System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes);
// Replace all instances of the DIV tag with an empty string
var oRegEx = "myoldurl.com";
oBody = oBody.replace(oRegEx, "testingurl.com");
// Set the response body to the div-less string
oSession.utilSetResponseBody(oBody);
我需要这样做,以便我可以在测试 url 上测试我们的新服务器服务,并确保客户端软件仍然可以正常交互。
【问题讨论】:
标签: url redirect url-interception