Click to See Complete Forum and Search --> : Plus Sign's get replaced by Spaces in URL


rbt
08-01-2007, 10:15 AM
Hello, I'm currently working on a project that utilized Coldfusion and is set up in IIS.

I had the site working great on a development server, but when I moved it to another for testing I started getting some problems.

Some of my pages and file names have plus signs in them "+" and the links to these files are broken. I get a Cold Fusion error saying the files are not found, and the path it gives have the plus sign's stripped out and replaced with spaces. My thoughts are that there must be a setting somewhere that does this.

If you need more info I can try to provide that, and thank you in advance if anyone can provide any clues as to why this is happening.

rbt
08-01-2007, 12:13 PM
Sorry for double post.

rbt
08-01-2007, 12:15 PM
I hope this isn't a double post, but it doesn't look like my last one worked.

Here's a pic of the page I'm getting for one of the pages that has a "+" in the path. In this particular example, the "+" is in a folder name, but it does the same thing when it is the name of an actual file.

http://i9.photobucket.com/albums/a74/robbymirque/error.png

BrainDonor
08-01-2007, 12:37 PM
try changing the + in the link to %2B which is the hex equivalent.

it should work.

rbt
08-01-2007, 12:43 PM
The only problem with changing the links and/or file names is that there are many, many pages and links. I use dreamweaver for developing this site, so I thought there might be a feature that would change the links site-wide, but it did not work for some reason.

I have come to the (possibly wrong) conclusion that the only reasonable easy and time efficient way of fixing this problem is through some sort of server setting, or something because as I mentioned in the original post.. everything works on the server I developed on, but goes haywire on the testing server.

Detect
08-01-2007, 12:43 PM
Within the query string, the plus sign is reserved as shorthand notation for a space. Therefore, real plus signs must be encoded. Look into using the URLEncodedFormat() function. Next time, stay away from symbols and spaces in file/folder names! :)

BrainDonor
08-01-2007, 12:47 PM
The only problem with changing the links and/or file names is that there are many, many pages and links. I use dreamweaver for developing this site, so I thought there might be a feature that would change the links site-wide, but it did not work for some reason.

I have come to the (possibly wrong) conclusion that the only reasonable easy and time efficient way of fixing this problem is through some sort of server setting, or something because as I mentioned in the original post.. everything works on the server I developed on, but goes haywire on the testing server.

UltraEdit will allow you to do search and replace within files without having to open every one of them.

rbt
08-01-2007, 12:47 PM
Within the query string, the plus sign is reserved as shorthand notation for a space. Therefore, real plus signs must be encoded. Look into using the URLEncodedFormat() function. Next time, stay away from symbols and spaces in file/folder names! :)

Could you elaborate, I am a newb developer (intern actually), and am unfamiliar with this function.

Also, could you explain why a copy of the site on one server would work perfectly, while on another does not?

rbt
08-01-2007, 12:52 PM
UltraEdit will allow you to do search and replace within files without having to open every one of them.

Dreamweaver does this too, but I would have to be able to find only "+" 's that appear within anchor tags (or possibly even more specific), and since I know nothing about regular expressions, I was unable to do this. What I thought dreamweaver would do for me, is if I change a filename in its file explorer that it would update all links to that page, but it would only do that for certain pages.

Detect
08-01-2007, 01:12 PM
http://www.google.com/search?q=URLEncodedFormat

Dunno, server settings I suppose.

Could you elaborate, I am a newb developer (intern actually), and am unfamiliar with this function.

Also, could you explain why a copy of the site on one server would work perfectly, while on another does not?

rbt
08-01-2007, 01:19 PM
http://www.google.com/search?q=URLEncodedFormat

Dunno, server settings I suppose.

Does anyone have any idea of a config either in IIS or some CF setting that would cause the path's to be handled like this and if/how I could edit it?

ray326
08-01-2007, 09:49 PM
Unlikely you can set a real web server up to disregard the HTTP spec don't you think?

http://www.freesoft.org/CIE/RFC/1945/12.htm

You need to know the RFCs. They define the way the Internet works.