$x = $_SERVER['QUERY_STRING']; $pattern = "/article/"; $replacement = "newsid"; $urr = preg_replace($pattern, $replacement, $x); $url = "http://politsovet.ru/index.php?".$urr; ?>