E.g. Redirect http://yourdomain.com/default.aspx to http://yourdomain.com
First create a web.config file in your root directory if it's not
already there. Second, put the following code into your web.config
file.
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
configuration
>
<
system.webServer
>
<
rewrite
>
<
rules
>
<
rule
name
=
"Default Document"
stopProcessing
=
"true"
>
<
match
url
=
"(.*)default.aspx"
/>
<
action
type
=
"Redirect"
url
=
"{R:1}"
redirectType
=
"Permanent"
/>
</
rule
>
</
rules
>
</
rewrite
>
</
system.webServer
>
</
configuration
>
Article ID: 1566, Created: March 3, 2014 at 9:42 PM, Modified: March 3, 2014 at 10:10 PM