Copied to clipboard

Flag this post as spam?

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


  • Mike 80 posts 101 karma points
    Apr 19, 2011 @ 16:17
    Mike
    0

    Need some help URL rewriting

    I need to rewrite some old .asp pages to  umbraco pages, but it is not working as I would like.

    old page is: /index.asp?PageID=39&OID=0

    new page is: /en

    <add name="redirectoldurltest"
         virtualUrl="^~/index\.asp\?PageID=39(.*)" rewriteUrlParameter="ExcludeFromClientQueryString"     redirectMode="Permanent"      redirect="Application"      destinationUrl="~/en" />

    This however is not working. 

    if i try this code:

          <add name="LegacyRedirect"
         virtualUrl="^~/index\.asp"
    rewriteUrlParameter="ExcludeFromClientQueryString"
         redirectMode="Permanent"
         redirect="Application"
         destinationUrl="~/"/>

    It works, however, the querystring parameters are appended to the URL and i don't want them. They should be discarded. 

    I need to use the PageID parameter because the ID tells me to which new page I should redirect.

    Can anybody help me?

    thanks

     

  • Mike 80 posts 101 karma points
    May 03, 2011 @ 11:06
    Mike
    0

    anybody?

  • Mike 80 posts 101 karma points
    May 20, 2011 @ 09:32
    Mike
    0

    Got it.

     

        <add name="LegacyRedirect"
        virtualUrl="^~/legacyPageWithParameters.asp?(.*)$"
         redirectMode="Permanent"
         redirect="Application"
        rewriteUrlParameter="IncludeQueryStringForRewrite"
         destinationUrl="~/dotNetAPSXPageLoseTheParameters.aspx"/>  


     


  • 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