IIS Rewrite rule doesn't work for subfolders

Anonymous
2024-10-02T16:07:42+00:00

Hello,

I need to enable a rewrite URL in IIS for my old TFS server ( Team Foundation Server).

The default website on 80 port, and tfs root website on 8080 work well, it rewrite the url well to my temporary website correctly, but it can't catch the tfs subfolder , I tested all the possibilities ....(only with match url, with conditions ... no way), I suspect tfs web.config right now ..

Here is my url rewrite configuration :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="Forward root">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="http://sptfs2:81" />
                </rule>
                <rule name="forward" enabled="true" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^/tfs/(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="http://sptfs2:81" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
    <location path="tfs">
    </location>
</configuration>

can you tell me what I missed please ?

Thank you

Windows Server Remote and virtual desktops

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes
Accepted answer
  1. Anonymous
    2024-10-07T01:52:58+00:00

    Hello,

    Thank you for posting in Microsoft Community forum.

    From the description above, I understand your question is related to IIS.

    Since there are no engineers dedicated to this topic in this forum. To be able to get a quick and effective handling of your issue, I recommend that you repost your question in the Q&A forum, where there will be a dedicated engineer to give you a professional and effective reply.

    Here is the link for Q&A forum.
    Questions - Microsoft Q&A

    Click the "Ask a Question" button in the upper right corner to post your question and select tags related to your products.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards, Karlie Weng

    0 comments No comments

0 additional answers

Sort by: Most helpful