0

I want to ignore all *.php requests to my server.

Now I can ignore .php requests on the root

routes.IgnoreRoute("{resource}.php");

How to ignore there requests everywhere, like this:

www.site.com/products/index.php
www.site.com/clients/africa/info.php
podeig
  • 2,597
  • 8
  • 36
  • 60

1 Answers1

-1

Did you try

routes.IgnoreRoute("*/{resource}.php");
sandeep
  • 149
  • 1
  • 12
  • Shouldn't it just be "*{resource}.php" ? so that it gets php pages that are in the root as well? – Tim Mar 07 '14 at 13:42
  • try this routes.IgnoreRoute("{resource}.php/{*pathInfo}"); and see this as well http://stackoverflow.com/questions/3156204/can-someone-explain-asp-net-routing-syntax-to-me – sandeep Mar 07 '14 at 13:54