Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows IIS重写如何截取设置的cookie值_Windows_Server_Iis 7.5_Url Rewrite Module - Fatal编程技术网

Windows IIS重写如何截取设置的cookie值

Windows IIS重写如何截取设置的cookie值,windows,server,iis-7.5,url-rewrite-module,Windows,Server,Iis 7.5,Url Rewrite Module,它没有任何像url=value或host=value这样的标准标记。这只是上面的一行,我需要抓住site1.domain1.net部分,然后切换到site2.domain2.com,但运气不太好 你可以在顶部的代码中看到,我试图这样做,但没有成功,因为我对玩cookies知之甚少。建议?我很接近,但没有使用正确的东西,尽管经过多次尝试和错误,我终于找到了答案 https%3a%2f%2fsite1.domain1.net%2flgn%2fauth2%2fagent%2fsrms%2frefres

它没有任何像url=value或host=value这样的标准标记。这只是上面的一行,我需要抓住site1.domain1.net部分,然后切换到site2.domain2.com,但运气不太好


你可以在顶部的代码中看到,我试图这样做,但没有成功,因为我对玩cookies知之甚少。建议?

我很接近,但没有使用正确的东西,尽管经过多次尝试和错误,我终于找到了答案

https%3a%2f%2fsite1.domain1.net%2flgn%2fauth2%2fagent%2fsrms%2frefresh

我很接近,但没有使用正确的东西,尽管我经过了多次尝试和错误才找到了答案

https%3a%2f%2fsite1.domain1.net%2flgn%2fauth2%2fagent%2fsrms%2frefresh

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="Rewrite requests" enabled="true">
                        <match url="(.*)" />
                        <action type="Rewrite" url="https://site1.domain1.net/{R:0}" />
                    </rule>
                </rules>
                <outboundRules>
                    <rule name="Rewrite outbound" enabled="true">
                        <match filterByTags="None" pattern="(.*)site1\.domain1\.net(.*)" />
                        <action type="Rewrite" value="{R:1}site2.domain2.com{R:2}" />
                    </rule>
                    <rule name="Modify Cookie">
                    <match serverVariable="RESPONSE_Set_Cookie" pattern=".*" />
                    <conditions>
                            <add input="{R:0}" pattern="(.*)site1\.domain1\.net(.*)" />
                    </conditions>
                    <action type="Rewrite" value="{C:1}site2.domain2.com{C:2}" />
                </rule>
                </outboundRules>
            </rewrite>
        </system.webServer>
    </configuration>