ColdBox or IIS Forcing URL Decode

60 views
Skip to first unread message

Jae Jung

unread,
Aug 22, 2014, 6:14:43 PM8/22/14
to col...@googlegroups.com
I have a situation where I'm trying to figure out where is the URL decoding is happening. From my understanding to have a SEO friendly URL I should replace spaces with hyphens (-). For example, if I have a URL string as http://www.somedomain.com/test%20url%20string/ then I should change to http://www.somedomain.com/test-url-string/
So I have a following scenario where I URLEncoded the strings and replaced the %20 to hyphens. See example below.

Original URL:

URL Encoded URL

SEO Friendly URL (I've replaced the %20 to a hyphen):

However, on the ColdFusion side the URL string is returned as follows.
It already decoded it for me before I could replace the hyphens to %20 then decode the string.

Is this an IIS, ColdFusion, or ColdBox issue. I would prefer the URL strings were NOT decoded automatically.
I'm on the following environment.
Windows 2012 Server 64bit
IIS 8
ColdBox 3.8.1

br...@bradwood.com

unread,
Aug 23, 2014, 4:48:11 PM8/23/14
to col...@googlegroups.com
I'm not sure if I really understand what you're doing, but ColdFusion (or the underlying Java servlet container) has always handled decoding URL data when it parses the query string.  That kind of string parsing is abstracted from your code for good reason.
 
That said, if you want to parse the bits yourself, check out the cgi.request_url variable.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages