mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
Don't redirect robots. Props thenlich and DD32. fixes #6891
git-svn-id: http://svn.automattic.com/wordpress/trunk@7871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4a19108aaf
commit
2fd45c2192
@ -35,7 +35,7 @@
|
|||||||
function redirect_canonical($requested_url=null, $do_redirect=true) {
|
function redirect_canonical($requested_url=null, $do_redirect=true) {
|
||||||
global $wp_rewrite, $is_IIS;
|
global $wp_rewrite, $is_IIS;
|
||||||
|
|
||||||
if ( is_feed() || is_trackback() || is_search() || is_comments_popup() || is_admin() || $is_IIS || ( isset($_POST) && count($_POST) ) || is_preview() )
|
if ( is_feed() || is_trackback() || is_search() || is_comments_popup() || is_admin() || $is_IIS || ( isset($_POST) && count($_POST) ) || is_preview() || is_robots() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( !$requested_url ) {
|
if ( !$requested_url ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user