1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Using % in URL name

Discussion in 'Site & Server Administration' started by macdesign, Sep 28, 2004.

  1. #1
    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_½/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.
     
    macdesign, Sep 28, 2004 IP
  2. clickdoc

    clickdoc Guest

    Messages:
    39
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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.
     
    clickdoc, Oct 5, 2004 IP
    macdesign likes this.
  3. macdesign

    macdesign Peon

    Messages:
    568
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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. :(
     
    macdesign, Oct 5, 2004 IP