<?php if ($_GET['p']) { $p = "p=" . intval($_GET['p']); } else if ($_GET['t']) { $p = "t=" . intval($_GET['t']); } header("Location: http://www.yoursite.com/forum/showthread.php?" . $p); ?>