mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
FIX Include query parameters when redirecting to files from index.php (fixes #7823)
This commit is contained in:
parent
3a531ddb20
commit
0761de7a2f
@ -55,6 +55,9 @@ $fileName = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . $url;
|
||||
*/
|
||||
if($url && file_exists($fileName)) {
|
||||
$fileURL = (dirname($_SERVER['SCRIPT_NAME'])=='/'?'':dirname($_SERVER['SCRIPT_NAME'])) . '/' . $url;
|
||||
if(isset($_SERVER['QUERY_STRING'])) {
|
||||
$fileURL .= '?' . $_SERVER['QUERY_STRING'];
|
||||
}
|
||||
header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
|
||||
header("Location: $fileURL");
|
||||
die();
|
||||
|
Loading…
Reference in New Issue
Block a user