Debt Consolidation - Kamala Harris - Submit articles - Debt Consolidation - Debt Consolidation

PDA

View Full Version : Using % in URL name


macdesign
Sep 28th 2004, 7:28 pm
I'm copying part of the open directory structure

For example they have

/Arts/Animation/Anime/Titles/R/Ranma[/url]_%c2%bd/Roleplaying/

http://dmoz.org/Arts/Animation/Anime/Titles/R/Ranma_%c2%bd/Roleplaying/

I can create a directory with the same ending name and it shows up on an FTP view, however, I cannot get to it with my browser, I get page not found. This happens consistently and I've cross checked by renaming it [from FTP] to remove the % , then I can browse ok, so that data is in fact accessable.

clickdoc
Oct 5th 2004, 9:40 am
Those special characters are only there so that they can be put into a URL. When you try to access them on the server they get translated back to the meaning of the character. So if you name the directory Ranma_%c2%bd there is no way you will be able to get to that from a browser becuase the % values get converted back to their real values. The value for %c2 is  and the value for %bd is ½. So your directory name has to actually be Ranma_½ and then the % values will get converted to that. You can find the codes and values for many characters on this page:

http://developer.irt.org/script/243.htm

(if im allowed to post urls at this point)

I don't know how to create those characters with the keyboard so I usually just copy them from another page and paste and it works great. Good Luck.

macdesign
Oct 5th 2004, 10:56 pm
Thanks - that helped me get on track. I searched for good documenation on this, but it's hard to find.

I actually have the encoded character string, and created the percent strings from them, but I was creating both the URL directory structure and the links from the percent signs. Now the HTML code uses the percents but the directories are created directly.

It was only ten minutes work to change the coding, but a days work to undo the mess I'd made. :(