Try Now
More in this section

Forums / Developing with Sitefinity / Custom URL Routing at Site Root

Custom URL Routing at Site Root

6 posts, 0 answered
  1. Andrew
    Andrew avatar
    6 posts
    16 Mar 2012
    14 Jul 2013
    Link to this post
    In my implementation of Sitefinity, I have a page with the URL "/user" configured to display the User Profile based on a provided user name. For example, http://mysite.com/user/user1 will display the user information the user with "user1".  

    What I'd like to do is offer a simplified version of this URL at the root of my site by removing the middle "/user/" directory:
    I'd like to do so while keeping in mind the following:
     - Still allow other pages configured at the root of my site to work (ex. ~/home, ~/login)
     - Do this dynamically for all users in the system (no maintaining of a static list of users somewhere)

    Here is my thought process on how to accomplish the solution. I'm just having trouble figuring out what to use for the first step.
     1) Create some sort of HttpHandler / HttpModule/ other functionality to intercept the request and determine if the URL request contains just one part after the root domain.
     2) If above is met, parse the URL and do a quick query to see if the provided part (ex. user1) is a valid username in the system.
     3) If so, transfer to serve the content of the actual user page (ex. http://mysite.com/user/user1).

    I have searched for many hours and tried many various solutions, some Sitefinity specific and others more general to IIS, but I haven't been able to situation.  I'm hoping someone else in the community has had this problem and can point me in the right direction or offer some advice.   Thanks!
  2. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    14 Jul 2013
    Link to this post
    This helper...
    ...will tell Sitefinity to not 404 a route

    Not sure if you can use that or not though :)
  3. Andrew
    Andrew avatar
    6 posts
    16 Mar 2012
    14 Jul 2013 in reply to Steve
    Link to this post
    Thanks for the info, though I still need to figure out a way for IIS/Sitefinity to even recognize the URL.  Right now it's currently using the StaticFileHandler and throwing a 404. I'm hoping has some code for an HttpHandler or HttpModule or custom Sitefinity Route that can be used to intercept the requests and determine if it's a valid username.
  4. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    18 Jul 2012
    29 Jan 2015 in reply to Andrew
    Link to this post

    did you ever find a solution for this? I'm attempting to accomplish something similar, and cannot seem to prevent Sitefinity from throwing 404 instead of allowing me to intercept the route...


    many thanks

  5. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    17 Oct 2016
    03 Feb 2015
    Link to this post
    Hello Josh,

    This functionality is not available but I have logged it as Feature request in our Feedback portal, where you could vote for it and subscribe receiving notifications on status change.

    Svetoslav Manchev
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
  6. Robert
    Robert avatar
    1 posts
    15 Apr 2015
    04 May 2015
    Link to this post


     We just purchased Sitefinity and was told this was possible. Are you saying that it is currently not possible? What is the ETA for this feature if any? Is there any other possible work-arounds?

     We have an existing MVC based website that has user and branch pages. Our current routing set up allows any non-static pages to be intercepted and checked against a routing table to see if a user or branch page exists.

     Therefore, this user URL:

     http://academymortgage.com/kevinglad is found in the table and re-routed to http://academymortgage.com/lo/kevinglad

     and this branch URL:

    http://academymortgage.com/chandler is found in the table and re-routed to


     How can we accomplish this with the latest version of Sitifinity?




    Keywords: custom url routing, register routes, user profile pages


6 posts, 0 answered