Last post Jan 17, 2012 05:23 PM by magicmike2011
Member
242 Points
439 Posts
Dec 27, 2011 03:42 AM|Mazenx|LINK
I am having an application where I need the default URL to be (www.mysite.com/home) , how can i do that ?? though I am using asp.net 4 url routing for all pages and I am using url rewriting for canonical urls, Thanks alot.
All-Star
21303 Points
4516 Posts
Dec 27, 2011 03:53 AM|sreejukg|LINK
see this
http://weblogs.asp.net/sreejukg/archive/2010/06/23/routing-in-asp-net-4-0-web-forms.aspx
Dec 27, 2011 03:57 AM|Mazenx|LINK
I am already using routing I just need to create default route , when user writes www.mysite.com , i need him to go to www.mysite.com/home
Participant
1731 Points
1146 Posts
Jan 13, 2012 01:40 AM|karang|LINK
Check this
http://gyansangrah.com/ArticleContent.aspx?ID=URLREWRITINGUSINGHTTPMODULES
1403 Points
494 Posts
Jan 17, 2012 05:23 PM|magicmike2011|LINK
Mazenx I am already using routing I just need to create default route , when user writes www.mysite.com , i need him to go to www.mysite.com/home
Hey there.
This is actually a simple solution. In your web.config you are able to specify the default document.
<system.webServer> <defaultDocument> <files> <clear / > <add value="mysite/home.aspx" /> // whatever the desired pages aspx file location is </files> </defaultDocument> </system.webServer>
Member
242 Points
439 Posts
url rewriting and url routing
Dec 27, 2011 03:42 AM|Mazenx|LINK
I am having an application where I need the default URL to be (www.mysite.com/home) , how can i do that ?? though I am using asp.net 4 url routing for all pages and I am using url rewriting for canonical urls, Thanks alot.
All-Star
21303 Points
4516 Posts
Re: url rewriting and url routing
Dec 27, 2011 03:53 AM|sreejukg|LINK
see this
http://weblogs.asp.net/sreejukg/archive/2010/06/23/routing-in-asp-net-4-0-web-forms.aspx
My Blog
Member
242 Points
439 Posts
Re: url rewriting and url routing
Dec 27, 2011 03:57 AM|Mazenx|LINK
I am already using routing I just need to create default route , when user writes www.mysite.com , i need him to go to www.mysite.com/home
Participant
1731 Points
1146 Posts
Re: url rewriting and url routing
Jan 13, 2012 01:40 AM|karang|LINK
Check this
http://gyansangrah.com/ArticleContent.aspx?ID=URLREWRITINGUSINGHTTPMODULES
Karan Gupta
http://gyansangrah.com
Please click "Mark as Answer" if this helped you.
Participant
1403 Points
494 Posts
Re: url rewriting and url routing
Jan 17, 2012 05:23 PM|magicmike2011|LINK
Hey there.
This is actually a simple solution. In your web.config you are able to specify the default document.