Copied to clipboard

Flag this post as spam?

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


  • Paul Blair 466 posts 731 karma points
    Jun 11, 2012 @ 01:22
    Paul Blair
    0

    URL Rewriting - split tags

    Hi,

    I'm trying to re-write some URLs for my blog so when filtering on tags I can trasnform:

    /blog/t/tag1/tag2/...

    into 

    /blog/?tabs=tag1,tag2,...

    My current rewite rule is

            <add name="tagrewrite"
              virtualUrl="^~/articles/t/(.*)"
              rewriteUrlParameter="ExcludeFromClientQueryString"
              destinationUrl="~/articles/?tags=$1"
              ignoreCase="true" />

    this works OK when my URL is in format /blog/t/tag1,tag2...

    (i.e. tags are seperated by comma)

    So what I want to know is if it possible for the rewrite rule to split the tags ($1) with a "/" and reqrite it with comma seperators. Not a big deal if it can't be done - it would just look a bit nicer.

    Cheers

    Paul

     

Please Sign in or register to post replies

Write your reply to:

Draft