Click here to Skip to main content
15,903,540 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wish to create like a sub-folder to the site that each sub-folder represent is checked with the database and if found loads the page "www.codeproject.com/center.aspx?id=test" but with different content.

For Example:
www.codeproject.com/test 
to
www.codeproject.com/center.aspx?id=test
or

www.codeproject.com/example 
to
www.codeproject.com/center.aspx?id=example


Those to links go to the same page name example named center.aspx but according to the text behind the "/" gets the information. if it exists in the database.

My site structure also have fixed sub folders.

How can I implement this. Already read this and some other sites

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

Using Approach 3: Using an HttpModule to Perform Extension-Less URL Rewriting with IIS7

The current problem is that every file request from that page is being direct to the page and should be directed to the actual folder. How can I solve this.

Server Info:
IIS 7
ASP.NET 3.0, 3.5 & 4.0
Has URLRewrite Module
Posted
Updated 28-Aug-10 1:19am
v3

1 solution

Look into asp.net routing for webforms:
http://www.4guysfromrolla.com/articles/051309-1.aspx
 
Share this answer
 
Comments
Clifweb 28-Aug-10 8:47am    
Thanks for this information an extra link found very helpful:
http://msdn.microsoft.com/en-us/library/cc668201.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900