简体   繁体   中英

How can I configure url rewrite to redirect from splash.aspx?page=3 to splash3.aspx?

I have already created a topic about query strings, unfortunately the question was closed and no one answers anymore.

For example, I want to redirect from splash.aspx?page=3 to a simpler url eg to splash3.aspx. I unfortunately have no backend code where the query string can respond, so I need an alternative. How can I configure url rewrite?

In your web.config, add the following nodes:

<rewrite>
  <rule name="Redirect splash page 3" stopProcessing="true">
    <match url="splash\.aspx$" />
    <conditions>
      <add input="{QUERY_STRING}" pattern="page=3" />
    </conditions>
    <action type="Redirect" url="splash3.aspx" redirectType="Temporary" />
  </rule>
</rewrite>

For more information see https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-configuration-reference

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM