diff --git a/upload/index.php b/upload/index.php index 3cb9f93..2e53a34 100644 --- a/upload/index.php +++ b/upload/index.php @@ -124,8 +124,16 @@ if(!empty($url)) { } elseif(isset($_GET['fromuser']) && $_GET['fromuser']) { $url .= sprintf('%sfromuser=%s', $delimiter, rawurlencode($_GET['fromuser'])); } - header("HTTP/1.1 301 Moved Permanently"); - header("location: $url"); + $parse = parse_url($url); + if(!isset($parse['host']) && file_exists($parse['path'])) { + if(!empty($parse['query'])) { + parse_str($parse['query'], $_GET); + } + require './'.$parse['path']; + } else { + header("HTTP/1.1 301 Moved Permanently"); + header("location: $url"); + } } else { require './'.$_ENV['curapp'].'.php'; }