开发者

How to remove .aspx from url

How can i remove .aspx开发者_开发知识库 from my urls as I used UrlRewritingNet and its giving me page not found error when i host the site to the server but its alright in the IDE browser.


You need to tell IIS to let ASP.NET handle all requests. This is known as a wildcard mapping, see option 1 on the following link: http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/


If you are using IIS 7 then you need to use Classic asp.net pool, which supports UrlRewritingNet.


In IIS, in tghe settings for your project. Click on Home Directory, then configuration, then mappings. Find .aspx, click settings, uncheck "Check that file exists".

Um, thats for IIS 6, so getting to the setting is probably a bit different in 7 but it's still there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜