Permalink
Browse files

FIX Include query parameters when redirecting to files from index.php…

… (fixes #7823)
  • Loading branch information...
1 parent 3a531dd commit 0761de7a2f3b8810379c9aadff7e113afb0921a6 @simonwelsh simonwelsh committed Aug 29, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 index.php
View
@@ -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();

0 comments on commit 0761de7

Please sign in to comment.