Copied to clipboard

Flag this post as spam?

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


  • Terry Clancy 204 posts 944 karma points
    Feb 24, 2017 @ 05:35
    Terry Clancy
    0

    Url Rewriting in Umbraco 7.5.10

    Dear Umbraco folk,

    I just upgraded to Umbraco 7.5.10 and note that UrlRewriting.config now says the following:

    <!-- 
    URLRewriting.net is obsolete and will be removed from Umbraco in the future.
    If you want to do rewrites, make sure to use IIS URL rewrite: https://www.iis.net/downloads/microsoft/url-rewrite
    The advantage of using IIS rewrite is that it is much faster, much less CPU intensive and much less memory intensive.
    -->
    

    Reading moe about IIS URL rewrite at https://www.iis.net/downloads/microsoft/url-rewrite indicated that it is an IIS Add-in and details how to set up redirects using a tool accessed from the IIS Admin UI.

    Cannot do that because my site runs on a hosted (GoDaddy) platform and I do not have access to install the add-in or use the admin UI. Furthermore what do I then use when testing my site in Visual Studio before deploying to IIS ?

    In any case I wish for my redirect rules to exist in a config field for easy deployment and maintenance. For example my redirect rules are currently defined by the following lines in UrlRewriting.config :

    <add name="DefaultCategoryProductRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/products/product/?catalog=$2&amp;category=$3&amp;product=$4" ignoreCase="true" xmlns="" />
    
    <add name="DefaultProductRewrite" virtualUrl="(.*)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/products/product/?catalog=$2&amp;product=$3" ignoreCase="true" xmlns="" />
    
    <add name="DefaultCategoryRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/products/catalog/?catalog=$2&amp;category=$3" ignoreCase="true" xmlns="" />
    
    <add name="DefaultCatalogRewrite" virtualUrl="(.*)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/products/catalog/?catalog=$2" ignoreCase="true" xmlns="" />
    

    Please let me know if the issues I have raised have solutions and if so I would really appreciate an explanation or a link to further reading on how to use this new approach in a way that is driven by config files and works with Visual Studio Debug.

    Thanks very much :-)

    Terry Clancy ClanceZ

  • 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