I have used Intellegencia UrlRewriter for a while now. I used it with VB class that looks up the product Name and gets the relevant ID number to use for the querystring. It works great.
How can I do the same thing in Umbraco?
I have thought of 1 way: To use url structure of ~/products/product_name/ (which is really ~/products/product.aspx?id=XX) and add ~/products/* as a reserved folder and basically take this entire page out of Umbraco.
The problem is that my client would like the site structure to be ~/product_name/ (not in a subfolder). My problem is that I don't think I have any way to tell Umbraco not to handle these pages.
I used to use Intellegencia on my old web forms projects. You can do you Url rewriting in the file called UrlRewriting.config.
it can be found in /config/UrlRewriting.config
These are the notes in the file to help you
Urlrewriting.Net is a cool tool, what can make your urls look nice. The rewriting is controlled with regular expressions. To get more help look at http://www.urlrewriting.net/.
This sample is usefull for a productpage, where the product comes from a dynamic datasource, e.g. a database. The querystring "productid" can be loaded from the template, into a macro, that then loads the product!
Any bugs or problems with the rewriter, contact Anders/Duckie
Integrating Umbraco and Intelligencia UrlRewriter
I have used Intellegencia UrlRewriter for a while now. I used it with VB class that looks up the product Name and gets the relevant ID number to use for the querystring. It works great.
How can I do the same thing in Umbraco?
I have thought of 1 way: To use url structure of ~/products/product_name/ (which is really ~/products/product.aspx?id=XX) and add ~/products/* as a reserved folder and basically take this entire page out of Umbraco.
The problem is that my client would like the site structure to be ~/product_name/ (not in a subfolder). My problem is that I don't think I have any way to tell Umbraco not to handle these pages.
Can anyone help me?
I used to use Intellegencia on my old web forms projects.
You can do you Url rewriting in the file called UrlRewriting.config.
it can be found in /config/UrlRewriting.config
These are the notes in the file to help you
Urlrewriting.Net is a cool tool, what can make your urls look nice.
The rewriting is controlled with regular expressions. To get more help
look at http://www.urlrewriting.net/.
Remember to read the manual!
http://our.umbraco.org/wiki/recommendations/recommended-reading-for-web-developers
The sample below rewrites a url from
"/product/someproductid.aspx" to
"/product.aspx?productid=someproductid"
The user will not see the rewritten path! The page that will be
loaded from umbraco will instead be:
"/product.aspx?productid=someproductid"
<add name="produktidrewrite"
virtualUrl="^~/product/(.*).aspx"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/product.aspx?productid=$1"
ignoreCase="true" />
This sample is usefull for a productpage, where the product comes from a
dynamic datasource, e.g. a database. The querystring "productid" can be loaded
from the template, into a macro, that then loads the product!
Any bugs or problems with the rewriter, contact Anders/Duckie
I have tried reading the documentation and I am struggling. Can you give me a little help on a basic setup of the web.config and the vb class file?
Also, can the friendly URL be based in the root folder of my site with this?
is working on a reply...