AI OnAI Off
Hi,
Did you tried to override TryConvertToInternal method of HierarchicalUrlRewriteProvider?
public override bool TryConvertToInternal(UrlBuilder url, out CultureInfo preferredCulture, out object internalObject) { preferredCulture = ContentLanguage.PreferredCulture;
Thank you Gregorz. I had the ConvertToInternal method implemented, so the tryconvert would have done the same functionality.
The problem was that the RewriteProvider was not hooked up in the episerver config correctly, and the RewriteModule was not set to EPiServer.Web.RoutingUrlRewriteModule.
according to the documentation : http://world.episerver.com/documentation/items/developers-guide/episerver-cms/75/routing/routing/ this is what's required to make it work.
So in Web config, I have a module registered under system.web> httpModules:
<add name="UrlRewriteModule" type="EPiServer.Web.RoutingUrlRewriteModule, EPiServer" />
In Episerver.config I set the urlRewrite section up as follows:
<urlRewrite defaultProvider="CustomUrlRewriter"> <providers> <clear /> <add description="EPiServer standard Friendly URL rewriter" name="EPiServerFriendlyUrlRewriteProvider" type="EPIServerFriendlyUrlRewriter,EPiServer" /> <add description="EPiServer identity URL rewriter" name="EPiServerIdentityUrlRewriteProvider" type="EPiServer.Web.IdentityUrlRewriteProvider,EPiServer" /> <add description="EPiServer bypass URL rewriter" name="EPiServerNullUrlRewriteProvider" type="EPiServer.Web.NullUrlRewriteProvider,EPiServer" /> <add name="CustomUrlRewriter" type="CustomUrlRewriter,MyAssemblyName" /> </providers> </urlRewrite>
Thanks for your help!
Hi,
WE have a custom url rewriter that inherits from the FriendlyUrlRewriter and this does not work with 7.5 any longer. We have tried changing the functionality to inherit from the hierarchicalUrlRewriterProvider, but this is missing a function: ConvertToInternalInternal.
My question is how do I recreate this functionality? The functionality is basically as follows :
Thank you!
Gabor