Copied to clipboard

Flag this post as spam?

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


  • Jason 86 posts 156 karma points
    Mar 11, 2014 @ 15:25
    Jason
    0

    Need help creating a rewrite rule in UrlRewriting.config

    I have searched infinity and beyond and have not been able to find the correct answer on how to successfully create a rewrite in our UrlRewriting.config file.

    Simply, we have the following page:

    http://online.saintleo.edu/academics/masters-programs/mba.aspx

     

    For SEO purposes, we want this page to always show up as:

    http://online.saintleo.edu/academics/masters-programs/online-mba-programs.aspx

    Can you please help me to create a successful rewrite within the UrlRewriting.config file?

     

    Thank you in advance.

  • Amir Khan 1199 posts 2567 karma points
    Mar 11, 2014 @ 21:41
    Amir Khan
    0

    It seems like if you want the page to ALWAYS show up at online-mba-programs.aspx url you should rename the page as such and redirect from the old page to the new one like this.

    <add name="domainRewriteIR"
    virtualUrl="/old-url.aspx"
    rewriteUrlParameter="ExcludeFromClientQueryString"
    destinationUrl="/new-url.aspx"
    redirect="Domain"
    redirectMode="Permanent"
    ignoreCase="true" />

     

    -Amir

  • Jason 86 posts 156 karma points
    Mar 12, 2014 @ 12:42
    Jason
    0

    Hi Amir,

    Thank you for your assistance.

    I tried what you recommended.  It does rewrite, changing the URL, however, I get "Page Not Found".

    This is what I place inside of the UrlRewriting file:

    <add name="MBA"
                   virtualUrl="/academics/masters-programs/mba.aspx"
                    rewriteUrlParameter="ExcludeFromClientQueryString"
                    destinationUrl="/academics/masters-programs/online-mba-programs.aspx"
                    redirect="Domain"
                 redirectMode="Permanent"
                  ignoreCase="true" />

    Thanks!

  • Amir Khan 1199 posts 2567 karma points
    Mar 12, 2014 @ 13:33
    Amir Khan
    0

    Hi Jason,

    What URL is the redirect resulting in that's giving you a 404 error?

    Also, if you may want to look into this package, it takes the pain out of creating redirects and adds a nice dashboard control so you / your editors can monitor misdirected incoming traffic: http://our.umbraco.org/projects/developer-tools/301-url-tracker

    -Amir

  • Jason 86 posts 156 karma points
    Mar 12, 2014 @ 13:39
    Jason
    0

    Hi Amir,

    When I had the rule in place, it was rewriting to the /academics/masters-programs/online-mba-programs.aspx but coming up as the 404.

    We are actually having admin access granted (hopefully today) and then can look into the 301-url-tracker.

    Thanks,

    Jason

  • Amir Khan 1199 posts 2567 karma points
    Mar 12, 2014 @ 13:58
    Amir Khan
    0

    Hi Jason,

    Out of curiosity, are you sure it wasn't resolving to this url? http://www.saintleo.edu/academics/masters-programs/online-mba-programs.aspx

    I wonder if the hostnames are set up incorrectly or something. There's no reason that a redirect should end up with 404 on an existing page.

    -Amir

  • Jason 86 posts 156 karma points
    Mar 12, 2014 @ 14:05
    Jason
    0

    Hi Amir,

    Ok, so we had this custom built SEM (SEO) module built by a 3rd party which ended up failing after we parted ways.

    I had unchecked the rule within this module the first time around.

    I left the box checked this time and placed the rule that you provided into the UrlRewriting.config file and it's now working the way we need it to.

    May be a bit confusing, but as long as it works now!  Thank you so very much, Amir!

    Going to go test it on a few other non working rewrites.

    Best,

    Jason

  • 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