Saturday, 24 August 2013

System.Web.Handlers.TransferRequestHandler and robots.txt

System.Web.Handlers.TransferRequestHandler and robots.txt

I have urls in my asp.net mvc 4 application such as:
http://site.com/retailer.com
http://site.com/other-retailer
http://site.com/retailer.com-from-uk
These map to a controller and action. In web.config I have the following
setup so I do not have to use runallmanagedmodulesforallrequests
<add name="ApiURIs-ISAPI-Integrated-4.0"
path="/*.*"
verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS"
type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0" />
This however means requests to robots.txt go through the managed pipeline,
when the file is on the filesystem.
Any ideas how to remove just robots.txt from the HttpHandler, even with
having the path as /*.* ?

No comments:

Post a Comment