What is the best way to force lower case URLs on rewrite?
- Global.asax?
- web.config?
All has failed...what am I doing wrong? See the following:
Global.asax
I don't know which method to use?
void Application_BeginRequest(object sender, EventArgs e)
{
HttpContext context = HttpContext.Current;
string path = Request.Path.ToLower();
context.RewritePath(path);
}
web.config
I have tried using the web.config method but can't manage:
<rewrite url="(.*)$" to="$1" permanent="true" />
How can I change the above code so that it automatically force the url to lower case?