i am working on asp.net mvc arch .
please help me
i want url rewriting how to do it can any one give me code for that
my url is www.fourwarmfeet.com
suppose any user register to the fourwarmfeet.com quick dynamicaly create subdomain on that user name .
suppose rahul will register then the url will created rahul.fourwarmfeet.com
please help me how to do it in anp.net mvc 2
Thanks
Loading
Bhavik SolankiPosted Nov 7, 2011, 7:55 AM
Hi,
If you are using MVC then no need to use url rewriting
You have required to define rules in Global.asax file in RegisterRoutes section
As per your example you are in register view now after register
you need to go in home screen when you need url with project/username
routes.MapRoute(
"RegisterUser",
"Home/{UserName}",
new { controller = "Home", action = "Index", UserNamne = ""});
Regards,
Bhavik
Javeed M ShaikhPosted Oct 4, 2011, 12:27 PM
http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/
Please do not forget to mark "Accepted Answer".