What I meant for you to do is to use that code to test whether the ? at
the end of the URL was a "bad query string" example.  So, where this
might be valid:

http://www.26liter.us/news.html?qVal1=34&qVal2=apple

....this is not:

http://www.26liter.us/news.html?

The snippet I sent will test to see if the URL follows the "bad format"
above.  In that case, you do what you would do if the user loaded the
page with no query string at all.  The more complicated snippet I sent
you lets a value like this pass through (presuming that ? within the
query string are okay):

http://www.26liter.us/news.html?qVal1=34&qVal2=apple&qVal3=Who?

HTH,
Matthieu


-----Original Message-----
From: Bailey, Neal [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 29, 2005 4:24 PM
To: CF-Talk
Subject: RE: Query String Dud - issue


Hey Matthieu,

Not sure I understand what to do with the code snippet you sent. 

It looks like its adding "?" to the url when I want to remove it if
there is not a query string available. 

Hope all this makes sense. 
I have been starring at it so long I'm not sure if I can explain it well
enough. 


Neal Bailey


-----Original Message-----
From: Cornillon, Matthieu (Consultant)
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 29, 2005 2:51 PM
To: CF-Talk
Subject: RE: Query String Dud - issue

Neal,

How about this:

<CFIF Right(cgi.HTTP_REFERER,1) IS "?">
        <!--- URL ends with ? --->
</CFIF>


If this is true, then the URL ends with a "?".  I don't know whether
having multiple ? in the URL will be necessary.  If so, and if this will
even work (I can't remember whether it causes browser error), then you
should use this instead:

<CFIF Right(cgi.HTTP_REFERER,1) IS "?" AND not
Find(cgi.HTTP_REFERRER,"?",Find(cgi.HTTP_REFERRER,"?") + 1)>
        <!--- URL ends with ? that does not terminate valid query string
--->
</CFIF>


HTH,
Matthieu



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227951
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to