Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sean 141 posts 179 karma points
    Oct 22, 2011 @ 02:56
    Sean
    0

    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

  • wolulcmit 357 posts 693 karma points
    Oct 22, 2011 @ 10:27
    wolulcmit
    0

    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&amp;s=$5" ignoreCase="true" xmlns="" />

    I'm no expert on the subject but that should hopefully get you started

    - Tim

  • Sean 141 posts 179 karma points
    Oct 23, 2011 @ 07:58
    Sean
    0

    Hi Tim,

    That's exactly what I was after, just a little bit to get me started.

    Much appreciated.

    Sean

Please Sign in or register to post replies

Write your reply to:

Draft