Copied to clipboard

Flag this post as spam?

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


  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Feb 21, 2010 @ 23:05
    Matt Brailsford
    0

    Question about UrlRewrite and NiceUrl

    Hi Guys,

    Just a quick question, but I was wondering, if you define a rule in UrlRewrite.config, will umbraco.library.NiceUrl pick this up in anyway when it renders it's links? Or would you need to format links manualy?

    Many thanks

    Matt

  • Neil Campbell 58 posts 182 karma points
    Feb 22, 2010 @ 00:44
    Neil Campbell
    100

    Hi Matt,
    No, im pretty sure nice url does not take into account the UrlRewrites configured in UrlRewrite.config. These happen when the page is requested.

    There may be some more info at http://www.urlrewriting.net/149/en/home.html as umbraco uses the UrlRewritingNet component.

    Hope this helps.

    Neil

  • Jamie Howarth 306 posts 773 karma points c-trib
    Feb 22, 2010 @ 00:54
    Jamie Howarth
    1

    Matt,

    Neil is right - the UrlRewriting module gets called as an HttpModule in the ASP.NET pipeline. Any URLs that meet the given criteria then get passed over to the Umbraco rendering engine accordingly, so anything in UrlRewriting.config applies before requests to Umbraco. However, it's a good thought to have this kind of behaviour built into the NiceUrl function.

    Benjamin

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Feb 22, 2010 @ 09:36
    Matt Brailsford
    0

    Cool,

    Cheers guys. It would be cool if NiceUrl checked the config for any matching rules and reformatted them accordingly, but least I know.

    Many thanks

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft