automatically rewrite URLs in ASP.NET
- by Ali_dotNet
I use VS2010,C# to develop an ASP.NET web site, my customers want me to have their pages like this:
mysite.com/customer (in fact they call mysite/customer/default.aspx)
so I've manually created several folders for each customer, and inserted a default.aspx file in the folder so that users can view customer page by typing mysite.com/customer
is there a better way for performing this scenario? I don't want to have mysite.com/customer1.aspx, I want to have mysite.com/customer1, is there anyway that I can remove folders (and their containing default.aspx files) and generate something automatic using my customers database?
should I use URL rewriting? is there anyway that I can create page mysite.com/customer1.aspx, and users can view it by typing mysite.com/customer1?
I think it is possible to rewrite URLs in web.config, but I don't want to do it manually in web.config as my pages would increase in a daily basis
thanks