Url Rewriting AC 7.02

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Url Rewriting AC 7.02

Post by heinscott » Wed Oct 26, 2011 10:22 am

Hello all,

I am wondering about url rewriting. I know that the major change with regards to this in AC came around version 7.03, but I was curious whether or not there would be any way that I could accomplish some sort of custom rewrites without upgrading (due to massive amounts of customization). I'd like to accomplish this all via rules setup in code, rather than on a node by node basis. For instance, maybe I would have... Category.aspx?CategoryId=500&CategoryId2=511, that would be shown as /Category/Pool-Chemicals/Shock... or something similar to this, depending on what we decide is important. I have no problem with writing the code, but I just am curious whether this ability is even exposed in my early version.

Thanks for the help!

Scott

plugables
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Sat Aug 15, 2009 4:04 am
Contact:

Re: Url Rewriting AC 7.02

Post by plugables » Wed Oct 26, 2011 11:08 am

You can write your own custom URL rewriter, set it as the default rewriter for AC in web.conf, and do whatever you like to do in that rewriter.

User avatar
david-ebt
Captain (CAPT)
Captain (CAPT)
Posts: 253
Joined: Fri Dec 31, 2010 10:12 am

Re: Url Rewriting AC 7.02

Post by david-ebt » Wed Oct 26, 2011 11:25 am

If you are using IIS7, Microsoft has a pretty nice rewrite engine built in now. You can rewrite your code that produces the links on your site to look like this:

Code: Select all

http://www.mysite.com//Pool-Chemicals/Shock/C512
or

Code: Select all

http://www.mysite.com//Pool-Chemicals/Shock/Anti-Bacterial-Agent-Gallon/P1512
The IIS rewrite engine uses regular expressions so you can redirect the CXXX pages to your category.aspx page and the PXXXX pages to your product.aspx page, etc.

There are ISAPI-based rewrite plug-ins available to earlier versions of IIS or as has been said, you can write a custom rewriter.
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

Post Reply