Query string in url rewriting.

CT693303 21 Reputation points
2021-05-10T15:57:22.377+00:00

Hello everyone,

I am new to iis. I want to redirect the current url to another url, can anyone help me?

Current URL: http://mvclocaltest/dev/?privateaccount=125645

Redirect URL: http://mvclocaltest/dev/?privateaccount=125645ade

Internet Information Services
0 comments No comments
{count} votes

Accepted answer
  1. Sam Wu-MSFT 7,531 Reputation points Microsoft Vendor
    2021-05-11T02:51:47.177+00:00

    Hi @CT693303

    You can try this rule:

    <rule name="test" stopProcessing="true">  
        <match url="(.*)" />  
              <conditions>  
                  <add input="{REQUEST_URI}" pattern="^/dev/\?privateaccount=125645" />  
              </conditions>  
        <action type="Redirect" url="dev/?privateaccount=125645ade" />  
     </rule>  
    

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.