in multi-disk, robot try to visit like /robot.txt will return 404 not 200
This commit is contained in:
@@ -502,6 +502,7 @@ function main($path)
|
|||||||
$_SERVER['disktag'] = $path;
|
$_SERVER['disktag'] = $path;
|
||||||
$pos = strpos($path, '/');
|
$pos = strpos($path, '/');
|
||||||
if ($pos>1) $_SERVER['disktag'] = substr($path, 0, $pos);
|
if ($pos>1) $_SERVER['disktag'] = substr($path, 0, $pos);
|
||||||
|
if (!in_array($_SERVER['disktag'], $disktags)) return message('Please visit from Home Page.', 'Error', 404);
|
||||||
$path = substr($path, strlen('/'.$_SERVER['disktag']));
|
$path = substr($path, strlen('/'.$_SERVER['disktag']));
|
||||||
if ($_SERVER['disktag']!='') $_SERVER['base_disk_path'] = path_format($_SERVER['base_disk_path']. '/' . $_SERVER['disktag'] . '/');
|
if ($_SERVER['disktag']!='') $_SERVER['base_disk_path'] = path_format($_SERVER['base_disk_path']. '/' . $_SERVER['disktag'] . '/');
|
||||||
} else $_SERVER['disktag'] = $disktags[0];
|
} else $_SERVER['disktag'] = $disktags[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user