URL重写不起作用 - IIS 7

时间:2012-02-02 00:41:55

标签: url iis-7 url-rewriting iis-7.5 url-rewrite-module

这是我们在Win 2003上的IIS 6中工作的东西,但最近我们已将服务器升级到2008和IIS 7.5,并且在我的生命中,我无法使本机支持的URL重写工作。

在网站(example.site.com)下,我设置了以下规则:

                <rule name="BD">
                    <match url="(.*)" />

                    <action type="Rewrite" url="http://new.site.net.au/$1" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^/content/packages/" />
                    </conditions>
                </rule>

我们有一个在(example.site.com)下运行的子应用程序,名为“Content”,例如exmaple。即https://example.site.com/content/ 该子应用程序使用以下代码启动以下html页面:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>

    <script type="text/javascript">

        var query = window.location.search;
        query += query == "" ? "?" : "&";
        window.location = 'https://' + document.domain + '/Content/Packages/Proxy/Proxy.aspx' + query + 'key=2AB90AC2-7106-4B92-87B1-EAD87E719A48';

    </script>

</head>
<body>
</body>
</html>

当这个推出时,我得到的只是:(虽然URL重写甚至没有发挥作用?

  

描述:HTTP 404.您正在查找的资源(或其中一个依赖项)可能已被删除,名称已更改或暂时不可用。请查看以下网址,确保拼写正确。   请求的URL:/Content/Packages/Proxy/Proxy.aspx

对此的任何帮助都将非常感谢!!!!

0 个答案:

没有答案