Link to home
Start Free TrialLog in
Avatar of Dan
DanFlag for United States of America

asked on

Need one rewrite rule that will take multiple variations of the same url and redirect it to one place.

I need to create a rewrite rule that will take multiple variations of the same url and redirect it to one place. Have tried the following with no success:

<rule name="AF09">
  <match url="(.*)" />
  <conditions logicalGrouping="MatchAny">
     <add input="{REQUEST_URI}" pattern="^news-and-features/af-blog/article/id/10967(.*)" />
     <add input="{REQUEST_URI}" pattern="^news-and-features/af-blog/article/id/10964(.*)" />
     <add input="{REQUEST_URI}" pattern="^news-and-features/af-blog/article/id/10962(.*)" />
  </conditions>
  <action type="Redirect" url="https://www.biblehistory.com/" redirectType="Permanent" appendQueryString="false" />
</rule>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Dan
Dan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dan

ASKER

This worked


<rule name="AF09">  
  <match url="(.*)" />  
  <conditions logicalGrouping="MatchAny">      
    <add input="{REQUEST_URI}" pattern="/news-and-features/af-blog/article/id/10967(.*)" />      
    <add input="{REQUEST_URI}" pattern="/news-and-features/af-blog/article/id/10964(.*)" />      
    <add input="{REQUEST_URI}" pattern="/news-and-features/af-blog/article/id/10962(.*)" />  
  </conditions>  
  <action type="Redirect" url="https://www.biblehistory.com/" redirectType="Permanent" appendQueryString="false" />
</rule>