URL Rewrite Provider API
From AbleCommerce Wiki
From version 7.0.3 forward, AbleCommerce exposes the URL rewrite functions using a provider API. This allows you to override the default URL rewrite handling and implement your own custom rules.
To create a custom rewriter, you must implement two interfaces from the CommerceBuilder.Catalog namespace: IUrlRewriter and IUrlGenerator. A sample project for both C# and VB is available here. Inside you will find the source for the default URL rewriter and a skeleton class for creating your own custom provider. Be aware that to make the project compile, you must update the reference to the CommerceBuilder.dll file.
When you compile your provider assembly, you must copy the created DLL to the bin folder of your AbleCommerce installation. Then you must activate it by manual modification of the App_Data/ablecommerce.config file. Out of the box, the file contains two lines like this at the bottom:
<urlRewriter enabled="true" provider="CommerceBuilder.Catalog.DefaultUrlRewriter" /> <urlGenerator enabled="true" provider="CommerceBuilder.Catalog.DefaultUrlGenerator" /> </application>
You must update the provider attribute to point to your new class:
<urlRewriter enabled="true" provider="AbleCommerce.Samples.UrlRewriter.DefaultProvider, SampleUrlRewriter" /> <urlGenerator enabled="true" provider="AbleCommerce.Samples.UrlRewriter.DefaultProvider, SampleUrlRewriter" /> </application>
After this change is made, it may be necessary to restart the web application for your custom rewriter to take effect. If you have upgraded from a pre-7.0.3 version, you may not have the urlRewriter and urlGenerator lines in your ablecommerce.config. This was noted in an optional post-upgrade step. If the lines are missing, simply add them just above the </application> line.

