Strip home path from path info. This prevents a path info value of '/wp/index.php' from being considered as a permalink request. fixes #1938

git-svn-id: http://svn.automattic.com/wordpress/trunk@3206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-11-23 22:38:25 +00:00
parent 6708e3d4ff
commit 313e9a406b
1 changed files with 2 additions and 1 deletions

View File

@ -1443,13 +1443,14 @@ class WP {
$req_uri = str_replace($pathinfo, '', $req_uri);
$req_uri = str_replace($home_path, '', $req_uri);
$req_uri = trim($req_uri, '/');
$pathinfo = str_replace($home_path, '', $pathinfo);
$pathinfo = trim($pathinfo, '/');
$self = str_replace($home_path, '', $self);
$self = trim($self, '/');
// The requested permalink is in $pathinfo for path info requests and
// $req_uri for other requests.
if (! empty($pathinfo) && ($wp_rewrite->index != $pathinfo)) {
if ( ! empty($pathinfo) && ($wp_rewrite->index != $pathinfo) ) {
$request = $pathinfo;
} else {
$request = $req_uri;