• Resolved almendron

    (@almendron)


    WordPress 6.3.2
    Plugin 2.2.2 (local)
    PHP 8.2.11

    Redirects do not work. Example
    URL: https://www.cnn.com/2023/09/26/europe/paris-france-homeless-relocation-olympics-intl-cmd/index.html
    Status: 302 OK
    Redirect URL: Same value as in the URL field

    However it is a 301 redirect. Click on the link and the result is
    https://edition.cnn.com/2023/09/26/europe/paris-france-homeless-relocation-olympics-intl-cmd/index.html

    • This topic was modified 2 years, 7 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter almendron

    (@almendron)

    This is turning into a mystery novel.

    I have three sites. Each in a subfolder:

    1. domain/tribuna/
    2. domain/blog/
    3. domain/artehistoria/

    Logically, all three are in the same hosting.

    The error occurs at all three sites.

    All three WP use the same theme and the same plugins.

    I don’t understand anything anymore 🙂

    Best regards
    Miguel

    • This reply was modified 2 years, 7 months ago by almendron.
    Thread Starter almendron

    (@almendron)

    Archivo legacy/modules/checkers/http.php

    // Redirects don't work when safe mode or open_basedir is enabled.
    if ( ! blcUtility::is_safe_mode() && ! blcUtility::is_open_basedir() ) {
    	curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
    } else {
    	$log .= "[Warning] Could't follow the redirect URL (if any) because safemode or open base dir enabled\n";
    }

    I have removed the conditional so that it does not evaluate “safe_mode” and “open_basedir” and the plugin works fine.

    I have tested and the redirects work even if safe mode or open_basedir is enabled. Therefore, the conditional would not be necessary, at least on my server.

    What is your opinion on this issue?

    Thread Starter almendron

    (@almendron)

    I have done some more tests and found only one small problem. As you can see in the image, the “Status” field is not correct. However, in the “Response headers” register the value is correct.
    (Note: open the image in a new tab to view it correctly)

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @almendron

    I hope you are doing well.

    I checked this but as you said with a small number of URLs is hard to say, the URL you shared in the description does have a 302 status when I did a cURL request ( similar to what the plugin does )

    https://monosnap.com/file/APVMUeNwt89hoSxveQBwQNwtHLSVr3

    So that status would be correct, could you please send an email to: [email protected] with this specific subject: ATTN: WPMU DEV support – wp.org

    Email: https://ww.wp.xz.cn/support/topic/incorrect-redirections
    More Links:

    Best Regards
    Patrick Freitas

    Thread Starter almendron

    (@almendron)

    Agreed. I’ll be travelling next week. On my return I will send the email with all the explanations.
    Best regards.
    Miguel.

    Note: Thank you very much for your efforts to solve the problem.

    Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @almendron,

    As the issue is escalated to an email, we will go ahead and mark this thread as resolved. If you have any additional questions or require further help, please let us know!

    Kind regards,
    Zafer

    Thread Starter almendron

    (@almendron)

    I apologise. I have not yet returned from holiday. I hope to send the email this weekend.

Viewing 7 replies - 16 through 22 (of 22 total)

The topic ‘Incorrect redirections’ is closed to new replies.