开发者

hide extensions of the pages with web.config

How do I hide the extensions of the pages?

Example ... access as is the normal asp page, but I would like to access the page or pages as ... without. asp

In my case I want it in web.config

开发者_运维知识库

Thanks!


You can use IIS URL Rewrite to do that, you can download it from: http://www.iis.net/download/URLRewrite

After that you can easily write rules to rewrite the path to match anything you want, including removing file extensions, etc.


If hiding dynamic page you should have in IIS > Handler Mappings a line with ExtensionlessUrlHandler-ISAPI-4.0_64bit

If static page, IIS has a bug for static files and you need to apply a hotfix (if not applied yet) http://support.microsoft.com/kb/2646735

after that you need to add to your Web.Config system.webServer section


you can modify the web.config file so the url only shows the directory

Hide webpage name

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜