account for query string in redirects

git-svn-id: http://svn.automattic.com/wordpress/trunk@748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
alex_t_king 2004-01-10 00:56:48 +00:00
parent 598c4723cf
commit 9fe4b92e20
3 changed files with 21 additions and 3 deletions

View File

@ -2,7 +2,13 @@
$curpath = dirname(__FILE__).'/';
require_once ($curpath.'wp-config.php');
require_once ($curpath.WPINC.'/template-functions.php');
if (!empty($_SERVER["QUERY_STRING"])) {
$location = get_bloginfo('rdf_url').'?'.$_SERVER["QUERY_STRING"];
}
else {
$location = get_bloginfo('rdf_url');
}
header('HTTP/1.0 301 Moved Permanently');
header('Location: ' . get_bloginfo('rdf_url') . "\n");
header('Location: ' . $location . "\n");
exit;
?>

View File

@ -2,7 +2,13 @@
$curpath = dirname(__FILE__).'/';
require_once ($curpath.'wp-config.php');
require_once ($curpath.WPINC.'/template-functions.php');
if (!empty($_SERVER["QUERY_STRING"])) {
$location = get_bloginfo('rss_url').'?'.$_SERVER["QUERY_STRING"];
}
else {
$location = get_bloginfo('rss_url');
}
header('HTTP/1.0 301 Moved Permanently');
header('Location: ' . get_bloginfo('rss_url') . "\n");
header('Location: ' . $location . "\n");
exit;
?>

View File

@ -2,7 +2,13 @@
$curpath = dirname(__FILE__).'/';
require_once ($curpath.'wp-config.php');
require_once ($curpath.WPINC.'/template-functions.php');
if (!empty($_SERVER["QUERY_STRING"])) {
$location = get_bloginfo('rss2_url').'?'.$_SERVER["QUERY_STRING"];
}
else {
$location = get_bloginfo('rss2_url');
}
header('HTTP/1.0 301 Moved Permanently');
header('Location: ' . get_bloginfo('rss2_url') . "\n");
header('Location: ' . $location . "\n");
exit;
?>