0

I want to make a not-so-common redirection on IIS and I'm not too sure this is possible. In my case I want to do something like that:

http://www.mywebsite/app/stuff?id=123 to http://www.mywebsite/app2/stuff?id2=456

Since there is nothing in common between the 2 parameters (only a file mapping the old URL and the new one) I was planning to create manual redirection rules for each entries to be redirected.

However my first simple tests showed by that it doesn't seem to work. Test rule looks like this

Is what I'm trying to achieve even possible? If it is, what am I doing wrong? Thanks in advance.

1 Answer 1

1

According to your description, if you want to modify the querystring by using url rewrite, I suggest you could try to use below rule:

       <rule name="MatchQueryString" stopProcessing="true">
            <match url=".*" />
            <conditions>
                <add input="{QUERY_STRING}" pattern="id=123" />
            </conditions>
            <action type="Redirect" url="/app2/stuff?id2=456" appendQueryString="false" />
        </rule>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.