use $_SERVER['QUERY_STRING']
to get the url query of the link before redirecting. for example
www.projectnaija.com/index.php?page=addtopic&cid=11
$url = $_SERVER['QUERY_STRING'];
$redirectTo = "http://www.projectnaija.com/m/index.php?{$url}";
i am not sure the best way but this will work, i think