From 9fe4b92e20dbd16fc4e87790813004ac664f9b68 Mon Sep 17 00:00:00 2001 From: alex_t_king Date: Sat, 10 Jan 2004 00:56:48 +0000 Subject: [PATCH] account for query string in redirects git-svn-id: http://svn.automattic.com/wordpress/trunk@748 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- b2rdf.php | 8 +++++++- b2rss.php | 8 +++++++- b2rss2.php | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/b2rdf.php b/b2rdf.php index 2e6ef99bd9..6923cebfd6 100644 --- a/b2rdf.php +++ b/b2rdf.php @@ -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; ?> \ No newline at end of file diff --git a/b2rss.php b/b2rss.php index e8c34368fb..5a2f2b9139 100644 --- a/b2rss.php +++ b/b2rss.php @@ -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; ?> \ No newline at end of file diff --git a/b2rss2.php b/b2rss2.php index 4844d49966..846ad64efe 100644 --- a/b2rss2.php +++ b/b2rss2.php @@ -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; ?> \ No newline at end of file