Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 26542

how to rewrite url with hyphen?

$
0
0

I want to redirect non-www url to www. My site name looks like   www.my-site.com i.e. contains a hyphen. Canonical domain name rule like this

<rules>

                <rule name="CanonicalHostNameRule1">

                    <match url="(.*)" />

                    <conditions>

                        <add input="{HTTP_HOST}" pattern="^www\.my-site\.com$" negate="true" />

                    </conditions>

                    <action type="Redirect" url="http://www.my-site.com/{R:1}" />

                </rule>

does not work

When I use escape like “\-“ I got a redirection loop…

Can you guys please point me to the right direction?


Viewing all articles
Browse latest Browse all 26542


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