I have some pages that reside as part of my umbraco install that actually sit outside umbraco. I was wondering how I could leverage the UrlRewriteModule to rewrite urls like: products.aspx?c=16&s=23 to /products/jeans/stove-pipe-jeans
Hi Sean, you could achieve that pretty easily by adding a rewrite rule into the UrlRewriting.config which lives in the /config folder
you'd still have to throw your c=16 and s=23 on the end though so your still passing the right numbers through to your product page. /products/jeans/stove-pipe-jeans/c-16/s-23
something like this should work, based on the example above:
UrlRewriteModule rewite urls outside umbraco
Hi There,
I have some pages that reside as part of my umbraco install that actually sit outside umbraco. I was wondering how I could leverage the UrlRewriteModule to rewrite urls like: products.aspx?c=16&s=23 to /products/jeans/stove-pipe-jeans
Thanks in advance.
Sean
Hi Sean, you could achieve that pretty easily by adding a rewrite rule into the UrlRewriting.config which lives in the /config folder
you'd still have to throw your c=16 and s=23 on the end though so your still passing the right numbers through to your product page.
/products/jeans/stove-pipe-jeans/c-16/s-23
something like this should work, based on the example above:
<add name="ProductRewrite" virtualUrl="(.*)/(.*)/(.*)/c-([0-9]+)/s-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/products.aspx?c=$4&s=$5" ignoreCase="true" xmlns="" />
I'm no expert on the subject but that should hopefully get you started
- Tim
Hi Tim,
That's exactly what I was after, just a little bit to get me started.
Much appreciated.
Sean
is working on a reply...