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

How to do a 301 regex redirect with IIS7

$
0
0
<div class="post-text" itemprop="text">

How can I do a 301 redirect with this pattern: /([^/]+)(?=/[^/]+/?$) in my .NET solution to redirect /en/solutions/exemple to /en/exemple in my web.config file

PS:I am new to .NET and IIS that's why I am asking

<system.webServer><rewrite><rules><rule name="regex redirect" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_HOST}" pattern="\/([^\/]+)(?=\/[^\/]+\/?$)" /></conditions><action type="Redirect" url="/en/solutions/exemple"
           redirectType="Permanent" /></rule></rules></rewrite>

Thanks

</div>

Viewing all articles
Browse latest Browse all 2482

Trending Articles



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