WordPress.org

Ready to get started?Download WordPress

Forums

WP deforms uploaded file's URL: why? (4 posts)

  1. richards1052
    Member
    Posted 9 years ago #

    I'm guessing that WP doesn't like certain characters in its file paths. I've linked in a sidebar link to the following URL:
    http://www.willamette.edu/~tsilvers/Yasmine'83/. When I click on the link WP leaves off the final Yasmine'83 portion of the file name & thus I get a 'file not found' msg. from the host server. I'm guessing it doesn't like that apostrophe (') before the number 83. (I've checked & I have entered the correct filepath/filename into my Links section.)

    How do you deal with this?

  2. Lorelle
    Member
    Posted 9 years ago #

    It isn't that WordPress doesn't like certain characters in its file path. It's that there are rules about which characters can be used in ANY file path. While Windows gets away with a lot of things, browsers and other programs can't.

    Quotes and apostrophes are part of programming codes used within most programs, but especially browser run programs, and definitely within PHP, which is what WordPress is built with.

    Take out the apostrophe, which is "wrong" use" and try linking again.

    I bet it will fix things.

    And for others watching, avoid the use of & , . ( ) @ $ and spaces and mixed capitals.

    Spaces may work on some machines but not all. And Mixed CaPitaLizaTion is just hard to read and remember when you are typing in things, so that often leads to boo boos. I could have spanked my husband who wanted to be helpful years ago and resize a bunch of graphics for our site and he named them all in sentences like this:

    This is Lorelle's picture of a Rufus-sided Towhee.jpg

    He is smarter now.

    I had to change 120 picture names. It's now rufus-sidedtowhee.jpg, FYI. ;-)

  3. Kafkaesqui

    Posted 9 years ago #

    You could also use the URL (hex) code for a single quote in your link:

    http://www.willamette.edu/~tsilvers/Yasmine%2783/

    But as Lorelle mentioned, punctuation is not good form for directory paths in a URL.

  4. richards1052
    Member
    Posted 9 years ago #

    I didn't name the file & don't 'own' it either. My brother (a college professor, but none too smart about file protocols obviously) did that on his college's server. I guess I could ask him to change the name. I'm surprised that his server accepted the name with the apostrophe.

    That hex code solution worked, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic