Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • aaronb 97 posts 116 karma points
    Dec 24, 2013 @ 03:58
    aaronb
    0

    Redirecting all non-www urls to www?

    Just wanted to check on this before I make any changes.

    I need to redirect all non-www. pages to the www. version. I'm assuming I would need to create a rule using a regular expression?

    Is that correct and/or should I be doing this another way? I'm not very familiar with regex so if anyone had an example it would be much appreciated.

    thank you

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Dec 24, 2013 @ 11:16
    Dennis Aaen
    1

    Hi aaronb,

    Try to see Doug Mackay post, and see if you could do some similar I think so.

    http://our.umbraco.org/forum/getting-started/questions-about-runway-and-modules/17657-301-Redirect-domaindk-to-wwwdomaindk

    <!-- SEO: Redirect from the domain without www to the domain with www-->
    <addname="seoCanonical"
           
    virtualUrl="http://domain.dk/(.*)"
           
    rewriteUrlParameter="ExcludeFromClientQueryString"
           
    destinationUrl="http://www.domain.dk/$1"
           
    redirect="Domain"
           
    redirectMode="Permanent"
           
    ignoreCase="true"/>

    <!-- SEO: Redirects from any domain to the standard domain-->
    <addname="seoCanonical"
           
    virtualUrl="http://(?!www\.domain.dk).*?/(.*)"
           
    rewriteUrlParameter="ExcludeFromClientQueryString"
           
    destinationUrl="http://www.domain.dk/$1"
           
    redirect="Domain"
           
    redirectMode="Permanent"
           
    ignoreCase="true"/>

    Hope this helps you.

    /Dennis

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Dec 24, 2013 @ 12:39
    Jeroen Breuer
    1

    You can also do this with the SEO Checker package.

    Jeroen

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies