views:

118

answers:

3

Hi, 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 script and the GET variables, and how he had the script with no extension in the first place. Any help?

A: 

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

Ignacio Vazquez-Abrams
+1  A: 

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.

SLaks
I gave me the directory listing (or rather Directory Listing Denied as I don't have it enabled). Is there a setting that needs to be flipped? The file is named index.html, and it is one of the default files
ckrames1234
But I did find that the website i found hadhttp://subdomain.domain.com/folder/index.php?var=valueand it appeared ashttp://subdomain.domain.com/folder/?var=value when I requested it like that
ckrames1234
Do you know a specific setting is IIS6 that needs to be set in order for this to work? because when I attempt to do it, it gives me a directory listing.
ckrames1234
K, it worked. The index.HTML wasn't default, but index.HTM was. stupid, stupid, stupid...
ckrames1234
A: 

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.

Cheeso
"It works on IIS 5.0, 5.1, 6.0, and 7.0." - http://iirf.codeplex.com/.Good thing it works for IIS6, because i have WHS, which is Windows Server 2003. I'll try it.
ckrames1234