haacked / feedback

Ask @haacked anything!
7 stars 1 forks source link

Hello. #138

Closed josebarodriguez closed 8 years ago

josebarodriguez commented 8 years ago

Hello!

I read you article about routing ignore: http://haacked.com/archive/2008/07/14/make-routing-ignore-requests-for-a-file-extension.aspx/ I did it but dont work routes.IgnoreRoute("{file}", new { file = @"(./)?file.xml(/.*)?" });

Can you tell me why it dont is working?

sorry for my english,

Thank!

haacked commented 8 years ago

Because {file} only matches one segment of the URL. Try

routes.IgnoreRoute("{*file}", new { file = @"(./)?file.xml(/.*)?" });