I have built site using asp.net web forms and used routes for friendly urls. I want to catch all php file requests and send them to a page which it will send the response back to the client as 410. below are some of the requests
1) /admin.php
2) /wp-login.php
3) http://easybankifsccode.com/administrator/index.php
Right now im catching all these requests in my code by cross checking with DB and redirecting to 404 page but i want to configure my route to catch all these php requests and send to 410 error page so there will be no db checking required
Something like
routes.MapPageRoute("phpfiles", "{resource}.php{anything}", "errors/410.aspx");
How to write this rule?