Copied to clipboard

Flag this post as spam?

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


  • How Do I Delete My Account? 68 posts 433 karma points
    Aug 20, 2015 @ 08:55
    How Do I Delete My Account?
    0

    Redirect 301 in the UrlRewrite config. How?

    Hello!

    I've tried to redirect (301) from an old URL to a new one using this piece of code:

    <add name="301Redirect_for_product"
                        virtualUrl="^/products/bathroom/toothbrush/(.*)"
                        rewriteUrlParameter="ExcludeFromClientQueryString"
                        destinationUrl="/products/hygieen/toothbrus/$1"
                        ignoreCase="true" />
    

    (The above URL is a changed example)

    However. It doesn't seem to work because what is left in the URL field is the old url it should redirect FROM. When I redirect the domain call it rewrites the domain name (from www to just http:///) - but not when I redirect the URL.

    Any idea how I tackle this?

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 8x c-trib
    Aug 20, 2015 @ 11:19
    Lars-Erik Aabech
    100

    Try adding redirect="Application":

    <add name="301Redirect_for_product"
                    virtualUrl="^/products/bathroom/toothbrush/(.*)"
                    rewriteUrlParameter="ExcludeFromClientQueryString"
                    destinationUrl="/products/hygieen/toothbrus/$1"
                    ignoreCase="true" 
                    redirect="Application"/>
    
Please Sign in or register to post replies

Write your reply to:

Draft