Not redirecting removd file page to error page

zigma4000

Member
YetiShare User
Wurlie User
Jun 9, 2013
39
0
6
UAE
www.uploadman.com
Hi,

Is there anyway that removed pages for any reasons like DMCA abuse removed files do not be redirected to error page and file has been removed message be shown on same url?

there is an issue with google adsense when I remove a file with issue it gets different type of abuse which is Navigation Other, which in detail says :
"Difficult site navigation: During our review of your website, we found your site difficult to navigate. Potential navigation issues include: redirects, pages behind a login or restricted access, broken links, excessive pop-ups, dialers, and pages under construction or not yet launched."

well I have no pop-ups no broken links no restricted access or login page, only it redirects to another page to show the file has been removed,

if file is removed in yetishare it will redirects the file download page to examle.com/error.html?e=File+has+been+removed+due+to+copyright+issues.

which google see as redirect!

what I want is error message to be shown on each removed files url instead of redirecting to another page to show error message!
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Copy of ticket response for other people:

The redirect is within /core/page/file_download.php.

You'll see:

elseif ($file->statusId == 4)
{
$errorMsg = t("error_file_has_been_removed_due_to_copyright", "File has been removed due to copyright issues.");
coreFunctions::redirect(coreFunctions::getCoreSitePath() . "/error." . SITE_CONFIG_PAGE_EXTENSION . "?e=" . urlencode($errorMsg));
}

You could try changing this to something like:

elseif ($file->statusId == 4)
{
$_REQUEST['e'] = t("error_file_has_been_removed_due_to_copyright", "File has been removed due to copyright issues.");
include_once(SITE_TEMPLATES_PATH . '/error.html');
exit;
}
 

zigma4000

Member
YetiShare User
Wurlie User
Jun 9, 2013
39
0
6
UAE
www.uploadman.com
Hi Adam,

Is it different in V4.4.1

I tried to do the same in this version but doesn't change anything and keeps redirecting to error page instead of staying on same page and showing error message.
 

yekupload5636

Member
YetiShare User
Dec 29, 2015
42
0
6
37
yekupload.ir
adam said:
Copy of ticket response for other people:

The redirect is within /core/page/file_download.php.

You'll see:

elseif ($file->statusId == 4)
{
$errorMsg = t("error_file_has_been_removed_due_to_copyright", "File has been removed due to copyright issues.");
coreFunctions::redirect(coreFunctions::getCoreSitePath() . "/error." . SITE_CONFIG_PAGE_EXTENSION . "?e=" . urlencode($errorMsg));
}

You could try changing this to something like:

elseif ($file->statusId == 4)
{
$_REQUEST['e'] = t("error_file_has_been_removed_due_to_copyright", "File has been removed due to copyright issues.");
include_once(SITE_TEMPLATES_PATH . '/error.html');
exit;
}
Hi Adam,
This method is good for the main domain(http://mydomain.com), but it fails for files that are in the file server(http://fs1.mydomain.com) and the message is not displayed.
Thank you.