How to redirect to domain/default.aspx
How can i redirect to domain/default.aspx when a user write in browser domain/anythig? Web app in asp.net with C# code.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Sandeep Singh ShekhawatRank #147 · 15.6K pointsPosted May 18, 2013, 5:40 PM EDT
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="Default.aspx" />
</files>
</defaultDocument>
</system.webServer>
Or you can set as start up page using VS by right click on page in solution explorer
http://www.iis.net/configreference/system.webserver/defaultdocument
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/dc6eb1b4-9028-4308-9935-52b64edfad36.mspx?mfr=true
http://www.netomatix.com/development/IIS7Configuration3.aspx
http://blogs.iis.net/bills/archive/2008/03/22/how-to-add-a-default-document-with-iis7-web-config.aspx