3

I wrote the code in global.asax contain this

oRoutes.MapPageRoute("test-route", "home/{cURL}", "~/test.aspx");

everything fine, but had error when URL contains "." symbol. And I add the code below just can fix only one dot in URL.

<httpRuntime relaxedUrlToFileSystemMapping="true" />

For Example, when I call http://foo.com/home/open.door.foo/, the routing failed.

Is there any simple way to fix this problem? thanks.

P.S 1: please don't provide the way to remove last words like ".foo", because there could be occur in my URL like http://foo.com/hey.john.open.the.book.volume.1-brabra :-)

P.S 2: For some reason, I must be use "." symbol in URL. :'(

Guest
  • 77
  • 9

1 Answers1

1

I guess based on several posts here in SO, you should encode your values

ASP.NET MVC: How to Route Search Term with . (Period) at the end

Semantic urls with dots in .net

Community
  • 1
  • 1
Devmonster
  • 699
  • 1
  • 10
  • 28
  • I had read those post that you pasted before ask this question. But I have some reasons can't replace this "." symbol, sorry... – Guest Jul 11 '12 at 14:31