Copied to clipboard

Flag this post as spam?

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


  • Fredrik Esseen 610 posts 906 karma points
    Jun 23, 2010 @ 13:52
    Fredrik Esseen
    0

    Using urlRewriting.config

    Hi!

    My customer has bought another company and want to redirect all traffic to his webpage from the old company. Im trying to use urlRewrite to maintain the index from google (301)

    <

     

    add name="gasol"

     

     

    redirectMode="Permanent"

     

     

    redirect="Domain"

     

     

    ignoreCase="true"

     

     

    rewriteUrlParameter="IncludeQueryStringForRewrite"

     

     

    virtualUrl="http://www.sunwind.se/sidor/gasolutrustning.html"

     

     

    destinationUrl="http://www.swexergon.se/produkter-foer-fritidshuset.aspx" />

     

    But when I try this nothing happens. Is the syntax wrong?

  • Fredrik Esseen 610 posts 906 karma points
    Jun 23, 2010 @ 14:13
    Fredrik Esseen
    0

    Tried it on another website and there it works. Think it has something to do with the host..

     

    Another question: If I want to rewrite an entire domain like: www.olddomainname.com -> www.newdomainname.com

    The rule should be written so that it takes all old adresses (www.olddomainname.com/test.aspx) and redirects to the new (www.newdomainname.com/test.aspx).

    Is that possible?

  • Thomas Kjær Nielsen 58 posts 88 karma points
    Jun 30, 2010 @ 23:29
    Thomas Kjær Nielsen
    0

    If you have access to your IIS installation, it could be handled from here?

    Just use the HTTP-redirection feature.

    /Thomas

  • Fredrik Esseen 610 posts 906 karma points
    Jul 02, 2010 @ 08:24
    Fredrik Esseen
    0

    Thanks, but i managed to solve it in the urlrewriting.config like this:

    <add name="oldomain_to_new_domain" 

    redirectMode="Permanent"
    redirect="Domain" 

    ignoreCase="true" 

    rewriteUrlParameter="IncludeQueryStringForRewrite" 

    virtualUrl="http://www.olddomain.com/(.*)" 

    destinationUrl="http://www.newdomain.se/$1" />

  • Thomas Kjær Nielsen 58 posts 88 karma points
    Jul 02, 2010 @ 11:35
    Thomas Kjær Nielsen
    0

    Nice! :-D

    Think I'll use that myself instead of the IIS handling! Thanks for the tip.

  • 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