How to remove trailing slash using IIS Rewrite. Please use the example code below to remove trail slash from a URL.
ex: Turn http://www.domain.com/abc/ to http://www.domain.com/abc
<
rule
name
=
"Remove trailing slash"
stopProcessing
=
"true"
>
<
match
url
=
"(.*)/$"
/>
<
conditions
>
<
add
input
=
"{REQUEST_FILENAME}"
matchType
=
"IsFile"
negate
=
"true"
/>
<
add
input
=
"{REQUEST_FILENAME}"
matchType
=
"IsDirectory"
negate
=
"true"
/>
</
conditions
>
<
action
type
=
"Redirect"
redirectType
=
"Permanent"
url
=
"{R:1}"
/>
</
rule
>
Article ID: 355, Created: March 9, 2013 at 1:52 AM, Modified: March 9, 2013 at 1:52 AM