Response 403 in restricted download
-
Can you change the function in File.php in this way to have not 500 but 403 on restricted download?
function DownloadDenied($msg_id) { if(WPFB_Core::$settings->inaccessible_redirect && !is_user_logged_in()) { //auth_redirect(); $redirect = (WPFB_Core::$settings->login_redirect_src && wp_get_referer()) ? wp_get_referer() : $this->GetUrl(); $login_url = wp_login_url($redirect, true); // force re-auth wp_redirect($login_url); exit; } $msg = WPFB_Core::GetOpt($msg_id); if(!$msg) $msg = $msg_id; elseif(@preg_match('/^https?:\/\//i',$msg)) { wp_redirect($msg); // redirect if msg is url exit; } wp_die((empty($msg)||!is_string($msg)) ? __('Cheatin’ uh?') : $msg,"",array( 'response' => 403 ) ); exit; }
500 is for error, this is restricted download and google sign this link as broken.
- The topic ‘Response 403 in restricted download’ is closed to new replies.