Copied to clipboard

Flag this post as spam?

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


  • FarmFreshCode 225 posts 422 karma points
    Apr 27, 2011 @ 17:36
    FarmFreshCode
    0

    Member Directory with NiceURLs

    Hello, I've having issues with my UrlRewrites and I was hoping I could get some quick guidance.I'm wanting to do this:

    but im not getting any action on my rewrite. Which is currently:

    <add name="memberrewrite"
                              virtualUrl="^~/home/directory/(.*)"
                              rewriteUrlParameter="ExcludeFromClientQueryString"
                              destinationUrl="~/directory/member?name=$1"
                              ignoreCase="true" />

    These are for member profile pages from the umbraco members section.

    /home/ got dropped into my URLs I believe when I changed to directory URLs, but I would like to remove that from all URLs as well..

  • FarmFreshCode 225 posts 422 karma points
    Apr 27, 2011 @ 20:01
    FarmFreshCode
    0

    Ok I made progress:

    <add name="memberrewrite"
               redirect="Application"
               virtualUrl="^~/home/directory\?id=(.*)"
               rewriteUrlParameter="IncludeQueryStringForRewrite"
               destinationUrl="~/directory/$1"
               ignoreCase="true" />

    This gets the action working.. but not sure how to get the member's user name instead of ($1)..

    course this is just sending me to a "Page Not Found" deal right now..

  • Lennart Stoop 304 posts 842 karma points
    Apr 27, 2011 @ 20:18
    Lennart Stoop
    0

    You won't be able to map the userid to username using rewrite by itself, unless of course you pass in the username as a parameter.

    I guess what you could do is create an HTTP handler that looks up the username and does another redirect.

Please Sign in or register to post replies

Write your reply to:

Draft