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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL Variables

Status
Not open for further replies.

wbg34

IS-IT--Management
Nov 2, 2000
550
US
I inherited an application template that uses a series of cfincludes to direct users to it's authentication. This Authentication works flawlessly unless the call to the app contains a url variable.

Basically, the Auth portion of the app uses CGI.PATH_INFO to retain the original location that the user was trying to reach. Unfortunately, CGI.PATH_INFO cuts off any of the url variables that were sent.

Is there any way to preserve the url variables as wll as the info that CGI.PATH_INFO returns.

Please note that this template is used across a number of applications. As such there are a number of different url variables in play here so I cannot just check for a specific variable.

The current workaround for this is to log in and then open the link with the variables again. Of course this is more difficult for the users so I need to find a better way.
 
You're looking for CGI.QUERY_STRING. You could try something like:
Code:
<cfif CGI.QUERY_STRING IS NOT "">
  <cfset Whatever = "#CGI.SCRIPT_NAME#?#CGI.QUERY_STRING#">
</cfif>
Or, an easier way would to be just treat the entire url string as a list, and if there is a query string, add it.
Code:
<cfset Whatever = listappend(cgi.script_name,cgi.query_string,"?")>



Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top