automatically rewrite URLs in ASP.NET

Posted by Ali_dotNet on Stack Overflow See other posts from Stack Overflow or by Ali_dotNet
Published on 2012-06-05T16:07:08Z Indexed on 2012/06/05 16:40 UTC
Read the original article Hit count: 188

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about url-rewriting