How to Rewrite a Root Domain to Default.ASPX With ASP.NET
- 1). Locate "web.conf," right-click on it, click on "Open with" and then click on "Notepad." The file should open in Windows Notepad.
- 2). Insert the following code between the "<system.webServer></system.webServer>" tags:
<rewrite>
<rules>
<rule name="Rewrite Rule" >
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{HTTP_HOST}" pattern="^yourdomain\.com" />
</conditions>
<action type="Redirect" url="http://www.yourdomain.com/Default.ASPX{R:1}"
redirectType="Permanent" /></rule>
</rules>
</rewrite>
Change "yourdomain.com" to the actual name of your domain name. - 3). Press "Ctrl" and "S" on your keyboard to save the file. Exit Notepad.
Source...