wp_redirect works on localhost but conflicts not on my host
I'm having a weird problem, I have the following code in my page.php template file:
开发者_运维技巧 if (is_page('redirect')) :
wp_redirect( get_option('home') );
else:
//Do something else
endif;
This works fine on my localhost, but when I upload it to my server it gives me the Headers already sent by pluggable.php, I understand there must be no output before calling this function but there isn't! Also I disabled my only plugin installed (buddypress) and nothing, there must be something on my host because otherwise it woudln't work on my localhost either.
Does anyone know what could be wrong??
Thanks in advance
Nvm, for some reason I updated WP to 3.1 and it fixed.
精彩评论