From 00b4d22860c871db3b1234ac0963c2cec8025e85 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@1909 602fd350-edb4-49c9-b593-d223f7449a82 --- 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