Forum Moderators: phranque

Message Too Old, No Replies

parenthesis breaking links

         

captainbarred

2:34 am on Jan 13, 2010 (gmt 0)

10+ Year Member



Hey all,

Not 100% sure this is an Apache issue, but it may be, if not, please let me know where I should post it.

My employer has me in the process of building an internal support web site that we store troubleshooting data on.

The site is pretty simplistic, but links to the different in-house apps that we own/use and links to everything from FAQs to Walkthroughs.

Now, all the data is on one of our servers and its all under different network folders and locations.

I use Apache Web server to host the site(which is why I am asking this question here).

Here is what is happening.

2nd level publishes a new app, they put all troubleshooting docs under

B:/application/application support/AppName/version 3.0/Rebuild(#303)/final data/FAQ.PDF

So I need to link to FAQ.PDF

I put the URL in and test the link.

It comes up saying its not found. Further investigation shows its dropping the closing parenthesis and the following backslash and trying to load:

"B:/application/application support/AppName/version 3.0/Rebuild(#303final data/FAQ.PDF"

This won't work obviously as there is no folder called "Rebuild(#303final data"

No matter what I try I cannot get it to work right....

I am cheating right now by linking to a batch file that calls the URL. But that creates an additional file that needs to be created and stored somewhere, as well as the fact that I need to click the link then click "run" to have it actually fire off. 1 or 2 is no big deal, but the more apps they work on and more support docs we get, the more links we have that need the batch files to link to...

I tried googling it and found that SQL among other things has trouble with parenthesis. Is apache the cause or is it something else in windows? Any ideas for workarounds?

I am trying to get 2nd level to change their folder naming criteria... but they don't want to hear it....

Again, I wasn't sure where to post this, but any assistance would be greatly appreciated!

jdMorgan

3:47 am on Jan 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have them read the HTTP protocol specifications on character *restrictions* in URI; We Webmasters are not free to put just any-old characters we like into URLs.

Get rid of the parentheses and pound signs, both of which are reserved characters in HTTP URIs [tools.ietf.org], and replace all spaces with hyphens to start. Then make the URLs all-lowercase as well. The first part is required for HTTP compliance and the second part, while not a requirement, will save your company a lot of money in the long term because you won't constantly have to fight character-escaping, URL-encoding, and casing-error problems (as in the current exercise).

IT may rule, but Corporate Finance can over-rule...

There are several other approaches that might work, assuming that you can write a script to 'vet' all proposed URLs and enforce a policy that they be checked. I'm only going to argue in favor of the simple solution here, as any of the others would just take too much time...

Jim

captainbarred

4:07 am on Jan 13, 2010 (gmt 0)

10+ Year Member



Jim,

Thanks for the fast reply.

I took HTML in college back when we were taught strictly in wordpad with no fancy code checkers. So I am no expert by any stretch, but get by.

Honestly your answer is about what I was expecting...

As for the "workarounds" they would honestly likely be over my head anyways. lol.

So thanks again, and I'll try and get the app teams to work on re-naming their folders!

-Tim

g1smd

8:29 am on Jan 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Another potential problem is if you really do link to B:/... instead of [localdomain...]