02-19-2017, 07:23 PM
It doesn't seem to have a problem if you have a & in front of the first get variable, so this works too...
if(file_exists($abs_us_root.$us_url_root.'usersc/'.$currentPage)){
if(currentFolder()!= 'usersc'){
$url = $us_url_root.'usersc/'.$currentPage;
if(isset($_GET)){
$url .= '?'; //add initial ?
foreach ($_GET as $key=>$value){
$url .= '&'.$key.'='.$value;
}
}
}
Redirect::to($url);
}
if(file_exists($abs_us_root.$us_url_root.'usersc/'.$currentPage)){
if(currentFolder()!= 'usersc'){
$url = $us_url_root.'usersc/'.$currentPage;
if(isset($_GET)){
$url .= '?'; //add initial ?
foreach ($_GET as $key=>$value){
$url .= '&'.$key.'='.$value;
}
}
}
Redirect::to($url);
}