Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

Need help with Rewrite Map that has similar keys

$
0
0

Hi,

I have a problem with using IIS URL Rewrite Maps.

Below is my Rewritemap

<rewriteMaps>
<rewriteMap name="SharePointOnline" >
<add key="/flavors/sci" value="https://sss.sharepoint.com/sites/poc-1" />
<add key="/flavors" value="https://sss.sharepoint.com/sites/office365" />
</rewriteMap>
</rewriteMaps>

 and my Rule below

<rewrite>
<rewriteMaps configSource="RewriteMaps.config" />
<rules>
<rule name="Redirect rule1 for SharePointOnline" stopProcessing="false">
<match url="([^/]+)(/?.*)" />
<conditions>
<add input="{SharePointOnline:/{R:1}}" pattern="(.+)" />
</conditions>
<action type="Redirect" url="{C:1}{R:2}" appendQueryString="true" redirectType="Permanent" />
</rule>
</rules>
</rewrite>

When I try accessing www.contoso.com/flavors/sci/_layouts/15/viewlsts.aspx it always redirects to https://sss.sharepoint.com/sites/office365/sci/_layouts/15/viewlsts.aspx

Can you help me how i can fix the above. I have 100 urls which has /flavors in the url which i need to redirect to different sites


Viewing all articles
Browse latest Browse all 2482

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>