From 02f33a34263dd87bdfc0a1c70c6ff799a5a28aad Mon Sep 17 00:00:00 2001 From: rboren Date: Sat, 4 Dec 2004 00:09:40 +0000 Subject: [PATCH] Do not attempt path info matching if PATH_INFO contains SCRIPT_NAME. Bug 353. git-svn-id: http://svn.automattic.com/wordpress/trunk@1909 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-blog-header.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-blog-header.php b/wp-blog-header.php index 1addc6be77..10d5d28d25 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -12,7 +12,10 @@ $query_vars = array(); // Process PATH_INFO and 404. if ((isset($_GET['error']) && $_GET['error'] == '404') || - (! empty( $_SERVER['PATH_INFO']) && '/' != $_SERVER['PATH_INFO'])) { + ((! empty($_SERVER['PATH_INFO'])) && + ('/' != $_SERVER['PATH_INFO']) && + (false === strpos($_SERVER['PATH_INFO'], $_SERVER['SCRIPT_NAME'])) + )) { // If we match a rewrite rule, this will be cleared. $error = '404'; @@ -81,6 +84,8 @@ if ((isset($_GET['error']) && $_GET['error'] == '404') || $wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error'); +$wpvarstoreset = apply_filters('query_vars', $wpvarstoreset); + for ($i=0; $i