I found a limitation in the routing mechanism for ASP.Net mvc, and I'm trying to find a workaround.
I posted a related question about the problem I had.
The essence of the problem is that routes that end on. (period) are never handled by the default routing engine. The error "Resource cannot be found" is always raised. For example, it cannot handle these URLs:
http:
http:
if I change it to a querystring parameter like this, it works fine:
http://www.wikipediamaze.com/wiki/?topic=Washington,_D.C.
I am trying to find an extension point in a routing mechanism that will help me solve this problem. I tried other solutions like this:
protected void Application_Error()
{
var url = HttpContext.Current.Request.RawUrl;
if(TopicRegex.IsMatch(url))
{
var fixedUrl = FixUrlPath(url);
Response.Redirect(fixedUrl);
Server.Transfer(fixedUrl );
}
}
, Response.Redirect Server.Transfer , MVC RedirectToAction . , .
, Apache, Wikipedia . http://en.wikipedia.org/wiki/Washington,_D.C. - , .