I'm trying to handle “The resource cannot be found.” error 404 when there is a dot at the end of url in sharepoint 2010 site.

I found this link <https://stackoverflow.com/questions/429963/the-resource-cannot-be-found-error-when-there-is-a-dot-at-the-end-of-the-ur> , this link is talking about 

`<httpRuntime relaxedUrlToFileSystemMapping="true" />` which is supported only in .Net 4.0 but sharepoint 2010 is working with .Net 3.5 CLR 2.0 I tried also handling `Application_PreSendRequestHeaders` in global.asax but it didn't work , I tried also ' IIS URL Rewriting Module 2.0. ' but I don't know how to use it correctly is it an inbound rule or outbound rule ? .

any help please , Thanks .