Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing variable with default document on IIS

Status
Not open for further replies.

RWunder

Programmer
Oct 30, 2001
4
US
I'm using IIS on NT4.0 SP6a
The site is working fine.
The site is set to have 'index.asp' as the default document
so when the URL:
is entered you get 'index.asp'
as the default document. This works fine.

Now, if you type: or either case the site still displays but I cannot read the variable 'from'.

If I type: I can read the variable.

I use the x=Request.QueryString("from") to access this
variable.

Why does it not work for the default document syntax?
Security issue, syntax or bug?

Here is the beginning of index.asp file:
<%
if isempty(Request.QueryString(&quot;from&quot;)) then
Session(&quot;Referrer&quot;) = &quot;NONE&quot;
else
Session(&quot;Referrer&quot;) = Ucase(Request.QueryString(&quot;from&quot;))
Response.Redirect(&quot;end if
%>
 
Well I would imagine that it would see that there is no specific page asked for and hence redirect to index.asp, losing the QueryString in the process. I doubt it's possible to pass QueryString params without giving them a page to go to. <insert witticism here>
codestorm
 
This is something that has been enabled in IIS 5.0...

Default Document Query String Behavior In IIS 5.0, if an .asp (or .cdx) file is configured as the default document, it can now receive a query string from a URL that does not specify the default document. For example, the URLs and will both send a query string value to the default .asp file


From IIS5.0 docs:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top