WordPress.org

Ready to get started?Download WordPress

Forums

Links: Can't use relative addresses? (6 posts)

  1. zach
    Member
    Posted 9 years ago #

    I use my "Links" to create lists of icons that point to different posts on my site. This works fine if I use absolute addresses with http://...

    The problem is both the Link's URI and the Image URI for the icon are local to my site so for the sake of portability I want to use an address like /graphics/icons/project-1.jpg instead of having to add the full http://www.example.com to the front of it.

    If I do enter a relative address, it doesn't work at all. Instead, it adds the http:// automatically, which becomes http://graphics/icons/project-1.jpg. This is for both the Link URI and the Image URI.

    Is there any way to override this? Other than this, these link lists work perfectly for my needs.

  2. OtherMichael
    Member
    Posted 9 years ago #

    This seems to be a new behavior since 1.2.1 ??? I have a number of links dating back to 1.2 (okay, not all that old) and whenver they get edited, they get the 'http://' thrown in front of them.... which renders them totally useless.

    "feature" creep!

  3. OtherMichael
    Member
    Posted 9 years ago #

    if you use PHPMyAdmin (or another interface to your MySQL database) the following query will strip the unnecessary headers from your URIs:

    UPDATE ip_links SET link_url = REPLACE ( link_url, "http:///", "/" );

  4. OtherMichael
    Member
    Posted 9 years ago #

    Er, be sure to replace ip_ with whatever your WP-prefix really is

  5. OtherMichael
    Member
    Posted 9 years ago #

    Uh, anybody? "Official" response? etc?

  6. OtherMichael
    Member
    Posted 9 years ago #

    bump.

    I note that I cannot use the Links Manage in an Intranet setting to point to file resources (no "http://" prefix).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.