dag78
04-28-2011, 03:43 PM
I am trying to set up asp.net Url rewritting in c#
I have installed the above but I cant get it to work
Here is my code
<rewriter>
<rewrite url="^.*-c([0-9]+)/?$" to="~/Catalog.aspx?CategoryID=$1" processing="stop"/>
<rewrite url = "~/Catalog/([^/.]+)\.aspx" to="~/Catalog.aspx?Category=$1" />
<rewrite url = "~/Product/(.+)/([0-9]+)-(.+).aspx" to="~/Product.aspx?ProductName=$2ProductID=$1" />
</rewriter>
I want the catalog page to rewrite to the category name and the product page to rewrite to the ProductName
Any ideas?
Dave
I have installed the above but I cant get it to work
Here is my code
<rewriter>
<rewrite url="^.*-c([0-9]+)/?$" to="~/Catalog.aspx?CategoryID=$1" processing="stop"/>
<rewrite url = "~/Catalog/([^/.]+)\.aspx" to="~/Catalog.aspx?Category=$1" />
<rewrite url = "~/Product/(.+)/([0-9]+)-(.+).aspx" to="~/Product.aspx?ProductName=$2ProductID=$1" />
</rewriter>
I want the catalog page to rewrite to the category name and the product page to rewrite to the ProductName
Any ideas?
Dave