Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

URL/Site Redirection

Posted on 2014-07-14
2
Medium Priority
?
282 Views
Last Modified: 2014-07-22
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#>'
0
Comment
Question by:dowhatyoudo22
2 Comments
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40194865
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
 
LVL 29

Accepted Solution

by:
becraig earned 2000 total points
ID: 40194972
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Screencast - Getting to Know the Pipeline

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question