Copied to clipboard

Flag this post as spam?

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


  • Jerode 44 posts 159 karma points
    Aug 18, 2013 @ 16:16
    Jerode
    0

    URL Rewrite - Exclude reserved words

    Hello all,

    Could someone offer assistance in the URL rewrite to match the following:

        <add name="CampaignCodeRewrite"
          virtualUrl="^~/enroll/(.*)"
          rewriteUrlParameter="ExcludeFromClientQueryString"
          destinationUrl="~/sponsors?campaign=$1"
          ignoreCase="true" />

    This works as desired but I do have a few subpages in enroll process that I would like to exclude such as:

    • /enroll/ - should go to the page without the rewrite picking it up
    • /enroll/step1/
    • /enroll/step2/
    • /enroll/step2/additionalUpgrades/
    • /enroll/step3/
    I tried a few things like 

        <add name="EnrollDefaultCodeRewrite"
          virtualUrl="^~/enroll/"
          rewriteUrlParameter="ExcludeFromClientQueryString"
          destinationUrl="~/enroll/"
          ignoreCase="true" />
        <add name="CampaignCodeRewrite"
          virtualUrl="^~/enroll/(.*)"
          rewriteUrlParameter="ExcludeFromClientQueryString"
          destinationUrl="~/sponsors?campaign=$1"
          ignoreCase="true" />

    which does work, but the second does not pick up.

    Can anyone offer a solution?

    Sincerely,

    Jerode

  • 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