Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I think I'm doing it the right way, but nothing happens:
<add name="Remove WWW" virtualUrl="(.*)://www(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="$1://$2" ignoreCase="true" />
So, I'm most likely doing it the wrong way.
What's wrong with the rule above ?
I blogged about this a couple years back:
http://www.proworks.com/blog/2011/03/31/permanent-301-redirect-domaincom-to-wwwdomaincom-in-umbraco/
Basically, this works for me to add the www so I think you could repurpose it to remove the www.
<add name="SEOfix" virtualUrl="^http\://domain.com/(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="http://www.domain.com/$1" redirect="Domain" redirectMode="Permanent" ignoreCase="true" />
See more at: http://www.proworks.com/blog/2011/03/31/permanent-301-redirect-domaincom-to-wwwdomaincom-in-umbraco/#sthash.0VeNIxMc.dpuf
I use the following rule for this:
<rule name="Remove www" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{HTTP_HOST}" pattern="^www\.(.+)$" /> </conditions> <action type="Redirect" url="http://{C:1}/{R:1}" redirectType="Permanent" /> </rule>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
UrlRewrite - remove www from URL
I think I'm doing it the right way, but nothing happens:
So, I'm most likely doing it the wrong way.
What's wrong with the rule above ?
I blogged about this a couple years back:
http://www.proworks.com/blog/2011/03/31/permanent-301-redirect-domaincom-to-wwwdomaincom-in-umbraco/
Basically, this works for me to add the www so I think you could repurpose it to remove the www.
See more at: http://www.proworks.com/blog/2011/03/31/permanent-301-redirect-domaincom-to-wwwdomaincom-in-umbraco/#sthash.0VeNIxMc.dpuf
I use the following rule for this:
is working on a reply...