Copied to clipboard

Flag this post as spam?

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


  • Wojciech Tengler 96 posts 199 karma points
    May 20, 2016 @ 18:12
    Wojciech Tengler
    0

    Obsolete umbPage QueryString parameter and UrlRewriting rules

    Today a couple of days before upgrade Umbraco from 4.7.1 to 6.2.6 I found that my UrlRewriting rules don't work.

    It is so interesting because I can't find any problems like this in Google.

    My rules looks like:

    <add name="ByPageOrImage" virtualUrl="^~/([^,]+),(\d{1,10})\.aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/default.aspx?umbPage=/$1.aspx&amp;page=$2" ignoreCase="true" />
    

    As you can see the destination url contains ~/default.aspx?umbPage= what is very obsolete.

    This rule should look like:

    <add name="ByPageOrImage" virtualUrl="^~/([^,]+),(\d{1,10})\.aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/$1.aspx?page=$2" ignoreCase="true" />
    

    I found in source codes comment like this:

    // note: requestModule.UmbracoRewrite also did some stripping of &umbPage // from the querystring... that was in v3.x to fix some issues with pre-forms // auth. Paul Sterling confirmed in jan. 2013 that we can get rid of it.

    So the old umbPage param was used in v3 version and now doesn't exist.

    It is so funny because it was working a couple of years without any problems.

Please Sign in or register to post replies

Write your reply to:

Draft