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]
// 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.
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)
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 )
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!