Skip to content

Commit

Permalink
FIX Include query parameters when redirecting to files from index.php…
Browse files Browse the repository at this point in the history
… (fixes #7823)
  • Loading branch information
simonwelsh committed Aug 29, 2012
1 parent 3a531dd commit 0761de7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.php
Expand Up @@ -55,6 +55,9 @@
*/
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();
Expand Down

0 comments on commit 0761de7

Please sign in to comment.