locked
WHS 2011 IIS and url-rewrite RRS feed

  • Question

  • Hi, this is an doublepost from the iis-forum. Sorry for that, but I get no answers there. Perhaps someone here can help.

    I’m using a tv-software on my whs 2011, which runs with an own webserver on a special port. I want to use a friendly url like „myname.homeserver.com/tv“. So I have created a virtual directory „tv“ for the tv-website and an inbound and outbound rule. That works fine. The file web.config in c:\programms\windowsserver\webapps\site has the lines

        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="ReverseProxyInboundRuleTV">
                        <match url="^tv/(.*)" />
                        <serverVariables>
                            <set name="HTTP_ACCEPT_ENCODING" value="" />
                        </serverVariables>
                        <action type="Rewrite" url="http://localhost:8089/{R:1}" />
                    </rule>
                </rules>
                <outboundRules>
                    <rule name="ReverseProxyOutboundRuleTV">
                        <match filterByTags="A, Form, Img" pattern="^http(s)?://localhost:8089/(.*)" />
                        <action type="Rewrite" value="http{R:1}://localhost/{R:2}" />
                    </rule>
                </outboundRules>
           </rewrite>
        </system.webServer>

    But what I really want is to switch to the site AFTER authorisation „myname.homeserver.com/remote/tv“. So I modified the 5th line above to

                        <match url="^remote/tv/(.*)" />

    and put everything in the web.config at „c:\programms\windowsserver\webapps\remoteaccess“ (and created a virtual directory under remote too).
    But that doesn’t work.! The server says something like „the site cannot be shown ..Ask the administrator.

    Any suggestions?
    Kaloschke

     

    Monday, June 13, 2011 8:41 AM

Answers

  • Solved: My mistake - the 5th line has also to be <match url="^tv/(.*)" />

    Kaloschke

    Tuesday, June 14, 2011 6:09 PM