Quantcast
Viewing latest article 2
Browse Latest Browse All 2

ASP.net url rewrite force lowercase

I have:

<!-- Force lowercase URLS --><rewrite url="~/(.*[A-Z]+.*)$" to="~/handlers/permredirect.ashx?URL=${lower($1)}" />

Perm redirect simply 301 redirects to the new URL.

This rule is meant to redirect any URL with an uppercase char to the lower case one.

This however creates a redirect loop, any ideas why? The only rules running so far are:

<rewriter><!-- Remove Trailing Slash for all URLS--><rewrite url="~/(.*)/($|\?(.*))" to="~/handlers/permredirect.ashx?URL=${lower($1)}$2" /><!-- Force lowercase--><rewrite url="~/(.*[A-Z]+.*)$" to="~/handlers/permredirect.ashx?URL=${lower($1)}" /><rewrite url="~/construct2($|\?(.*))" to="~/construct2.aspx" processing="stop" /></rewriter>

Viewing latest article 2
Browse Latest Browse All 2

Trending Articles