Path info permalinks weren't getting 404 treatment.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8f5144ccfc
commit
d27f6e58e6
|
@ -183,8 +183,8 @@ if ( is_single() || is_page() ) {
|
||||||
// 404 if one was already issued, if the request was a search, or if the
|
// 404 if one was already issued, if the request was a search, or if the
|
||||||
// request was a regular query string request rather than a permalink request.
|
// request was a regular query string request rather than a permalink request.
|
||||||
if ( (0 == count($posts)) && !is_404() && !is_search()
|
if ( (0 == count($posts)) && !is_404() && !is_search()
|
||||||
&& !empty($_SERVER['QUERY_STRING']) &&
|
&& ( isset($rewrite) || (!empty($_SERVER['QUERY_STRING']) &&
|
||||||
(false === strpos($_SERVER['REQUEST_URI'], '?')) ) {
|
(false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
|
||||||
$wp_query->is_404 = true;
|
$wp_query->is_404 = true;
|
||||||
if ( preg_match('/cgi/', php_sapi_name()) )
|
if ( preg_match('/cgi/', php_sapi_name()) )
|
||||||
@header('Status: 404 Not Found');
|
@header('Status: 404 Not Found');
|
||||||
|
@ -231,6 +231,7 @@ if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
|
||||||
include(get_date_template());
|
include(get_date_template());
|
||||||
exit;
|
exit;
|
||||||
} else if ( is_archive() && get_archive_template() ) {
|
} else if ( is_archive() && get_archive_template() ) {
|
||||||
|
echo "here";
|
||||||
include(get_archive_template());
|
include(get_archive_template());
|
||||||
exit;
|
exit;
|
||||||
} else if ( is_comments_popup() && get_comments_popup_template() ) {
|
} else if ( is_comments_popup() && get_comments_popup_template() ) {
|
||||||
|
|
Loading…
Reference in New Issue