Showing posts with label Redirect incoming requests to specific URLs in IIS 7. Show all posts
Showing posts with label Redirect incoming requests to specific URLs in IIS 7. Show all posts

Saturday, December 30, 2017

Redirect incoming requests to specific URLs in IIS 7


The Rule "aboutus" is redirect a specific page to a another page.

The Rule "legal" is to redirect the all html files from a folder to a specific page.
<system .webserver="">
        <rewrite>
          <rules>
            <rule name="aboutus">
              <match url="^about-us.html$"></match>
              <action type="Redirect" url="/index.html"></action>
            </rule>
            <rule name="Legal">
              <match url="^Legal/(.*).html$"></match>
              <action type="Redirect" url="/index.html"></action>
            </rule>
          </rules>
        </rewrite>
     </system>