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?
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.
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.
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
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
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
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
is working on a reply...