WordPress.org

Ready to get started?Download WordPress

Forums

Root Relative URLs
[resolved] attachment guid link in "wp_post" (6 posts)

  1. Huijun
    Member
    Posted 1 year ago #

    Hello,

    This tool helps me a lot. All page and post use relative address. But for the attachment, it seems not work. In table "wp_posts", attachment guid link is still absolute link.

    Could you give me some advise about this problem.

    Thanks.

    Stella

    http://wordpress.org/extend/plugins/root-relative-urls/

  2. MarcusPope
    Member
    Plugin Author

    Posted 1 year ago #

    @Huijun - Yeah, I can absolutely look into this problem and release a patch. I'll try to reproduce the problem today and get back with you on when I can deliver a solution.

    Thanks,
    Marcus

  3. Huijun
    Member
    Posted 1 year ago #

    @MarcusPope

    Thank you Marcus, you are so effective.
    I am trying to find a solution too, but I modify the /wp-admin/includes/medis.php
    If you could realise this function in the plugin, it should be better for users.

    Have a good day.
    Stella

  4. MarcusPope
    Member
    Plugin Author

    Posted 1 year ago #

    @Huijun - Ok, I think I have a fix for this issue. I'll release 1.7 here shortly.

    But first, are you sure you added the following lines to the wp-config.php file?

    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
    define('WP_CONTENT_URL', '/wp-content');
    define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);

    I just want to confirm because if WP_CONTENT_URL is not defined properly, it could also cause this problem.

    Another cause is if you have specified an absolute url in Admin > Settings > Media : Uploading Files. Removing this and using the default value would also fix the problem (but won't be necessary in version 1.7 of my plugin.)

    Regardless, I can intercept the URL and adjust it to root relative. If after verifying the define statements above are in your wp-config and after upgrading to 1.7 you still have problems then let me know and I'll work with you further on this issue.

    I should have 1.7 released in a half hour or so.

  5. MarcusPope
    Member
    Plugin Author

    Posted 1 year ago #

    resolved in version 1.7

  6. Huijun
    Member
    Posted 1 year ago #

    @MarcusPope

    Bravo. After a weekend, this is a surprise for me. As you said, I found out that this problem was caused by the configuration of upload media.

    And I tried the new version, it works perfect.

    Thanks for your help.

    Have a good day. :)

    Stella

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.