You can use mod_rewrite
for this. If this module is available you use these rules (must be placed inside /.htaccess
):
RewriteEngine on
RewriteCond %{QUERY_STRING} ="abc"
RewriteRule ^page1\.php$ /page1.php?xyz [R=301,L]
There is a PHP-only solution too:
if ($_SERVER["QUERY_STRING"] == "abc") {
header("Location: /page1.php?xyz", true, 301);
die;
}