开发者

IIS Files with No Extension

开发者 https://www.devze.com 2022-12-18 00:29 出处:网络
I recently saw a website in which the url was formulated like this: http://subdomain.domain.com/script/?var=value

I recently saw a website in which the url was formulated like this:

http://subdomain.domain.com/script/?var=value

I was wondering how to do this in IIS, and how he put a slash in between the s开发者_高级运维cript and the GET variables, and how he had the script with no extension in the first place. Any help?


There are many ways to do this; I'll describe the simplest.

script is a folder containing a file called Default.aspx (or whatever is configured as the Default Document in IIS)

Therefore, when IIS sees a request to script/, it will send the request to Default.aspx, which then reads the query string.


Lack of filename defaults to the "index" entry, probably default.asp[x] there.


The best way to do it is with a URL Rewriter, like IIRF, or the built-in URL Rewriting module that's included with IIS7 and later.

0

精彩评论

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