The challenge is to upgrade the site and retain these URLs - including the legacy display of products, and mapping between the slug (e.g "toy-mouse") and the product.
I've created a page called "Product" in Umbraco, and on this page I embed a user control which displays the Product details just as they were in the old system. But how do I point "product/*" to this page, where "*" is anything?
If I use a query string parameter instead (e.g. tempuri.org/product?toy-mouse) this is easy, but as mentioned above I must retain the original URLs.
Your help is hugely appreciated!
Gary
(apologies if this shows up twice; my line breaks were munged and the editing feature currenty breaks on submit)
Mapping wildcard paths for routing in Umbraco
Hi there,
I'm updating a legacy site to use Umbraco. For its product inventory, it uses URLs such as the following:
http://tempuri.org/product/toy-mouse
http://tempuri.org/product/inflatable-duck-with-hat
http://tempuri.org/product/talking-scorpion
The challenge is to upgrade the site and retain these URLs - including the legacy display of products, and mapping between the slug (e.g "toy-mouse") and the product.
I've created a page called "Product" in Umbraco, and on this page I embed a user control which displays the Product details just as they were in the old system. But how do I point "product/*" to this page, where "*" is anything?
If I use a query string parameter instead (e.g. tempuri.org/product?toy-mouse) this is easy, but as mentioned above I must retain the original URLs.
Your help is hugely appreciated!
Gary
(apologies if this shows up twice; my line breaks were munged and the editing feature currenty breaks on submit)
Hi again,
Can anyone point me in the right direction to figure out this issue?
All advice massively appreciated and desperately sought :)
Gary
This should be possible by using url rewriting, you could play around with that.
in the config file UrlRewriting.config add something like
<add name="ProductRewite" virtualUrl="~/product/(.*)$" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="/product?name=$1" ignoreCase="true" />
Hope this helps!
Thanks Stephen Roberts, you cool cat.
is working on a reply...