Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a project written in asp.net

all the pages have names in Hebrew and are listed under a folder named: "StaticContent".

What I wish to do, is simply remove the /staticContent/ and the ".aspx" from the url.

Meaning, a url that is currently: http://www.test.lcl/StaticContent/חחח.aspx

should be: http://www.test.lcl/חחח

If the url's were all in English, this in the global.asax - would work:

C#
System.Web.Routing.RouteCollection routes = System.Web.Routing.RouteTable.Routes;
routes.MapPageRoute("static routing", "{page}", "~/staticContent/{page}.aspx");


But when I try this, I get 404 (The resource cannot be found) error.

Thanks for the Help, Elad.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900