Copied to clipboard

Flag this post as spam?

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


  • Darren Clark 52 posts 249 karma points
    Jun 30, 2010 @ 11:35
    Darren Clark
    0

    Help 301

    Hi,

     

    I have implemented a 301 permanent redirect using the url rewriting config. The problem is that 

    i rewrite from say http://mysite.com to http://web.mysite.com, the redirects works but it adds /default.aspx to the end of the url.

     

    My question is how can i remove the default.aspx?

     

    thanks

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Jun 30, 2010 @ 12:36
    Stefan Kip
    0

    I'm not sure, but maybe it'll help if you rewrite to http://web.mysite.com/ --> ending slash

  • Darren Clark 52 posts 249 karma points
    Jun 30, 2010 @ 14:18
    Darren Clark
    0

    hi kip,

     

    tried that and it still displays default.aspx

     

    cheers

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Jun 30, 2010 @ 14:26
    Stefan Kip
    0

    Just a guess; you're using IIS6 aren't you?

  • Darren Clark 52 posts 249 karma points
    Jun 30, 2010 @ 15:06
    Darren Clark
    0

    yeh using iis6

     

    just resolved the issue by changing the rewrite rule, adding /(.*) to the end of the virtualurl worked.

     

    what i thought would work:

    <add name="301redirect"

    redirect="Domain"

    ignoreCase="true"

    rewriteUrlParameter="ExcludeFromClientQueryString"

    virtualUrl="http://mysite.com"

    redirectMode="Permanent"

    destinationUrl="http://web.mysite.com" />

     

    what actually works:

    <add name="301redirect"

    redirect="Domain"

    ignoreCase="true"

    rewriteUrlParameter="ExcludeFromClientQueryString"

    virtualUrl="http://mysite.com/(.*)"

    redirectMode="Permanent"

    destinationUrl="http://web.mysite.com" />

     

    cheers

     

     

Please Sign in or register to post replies

Write your reply to:

Draft