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
Url Rewriting AC 7.02
Re: Url Rewriting AC 7.02
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.
Re: Url Rewriting AC 7.02
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:
or
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.
Code: Select all
http://www.mysite.com//Pool-Chemicals/Shock/C512
Code: Select all
http://www.mysite.com//Pool-Chemicals/Shock/Anti-Bacterial-Agent-Gallon/P1512
There are ISAPI-based rewrite plug-ins available to earlier versions of IIS or as has been said, you can write a custom rewriter.