URL/Site Redirection

Looking to create a handful of fairly static webpages for a number of users. For example:

www.mysite.com/user1
www.mysite.com/user2
www.mysite.com/user3

However instead of creating individual sites for each user I'm thinking about creating a single web page with a backend database storing the info that is unique to each user. I can then use a query string parameter to grab the appropriate information needed for the respective user.

1. is it possible to redirect 'www.mysite.com/user1' to 'www.mysite.com/pool/default.aspx?id=user1' in IIS?
2. if so, how?
3. if the redirection mentioned above is possible is it also possible to perform dynamic redirections? For example, is it possible to redirect 'www.mysite.com/<user#>' to 'www.mysite.com/pool/default.aspx?id=<user#>'
dowhatyoudo22Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Randy PooleCommented:
what you want to do is trap error 404[page not found] lookup the userx or whichever to determine if it is valid then do a response.redirect to the page pool/default.asp and storing userx as a session variable so it is not appended to the string.
0
becraigCommented:
First make sure you have the IIS URL Rewrite module installed:
http://www.iis.net/learn/extensions/url-rewrite-module/url-rewrite-module-configuration-reference

Next take a look at the examples here (you can  determine the url based on query string)
http://www.iis.net/learn/extensions/url-rewrite-module/user-friendly-url-rule-template

The above two steps should get you there (you will have to do a small amount of heavy lifting on your own - tweaking the template).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Services

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.