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!