fazlionline Posted May 10, 2009 Share Posted May 10, 2009 Hello allI have a link on my site for a blog.when that page opens it have a redirect script for a blog in other websitebut when i clik on blog linke the page opens but do not redirect to other page and give this error:Warning: Cannot modify header information - headers already sent by (output started at d:\Customers\user1092190\www\v2\blog\blog.php:9) in d:\Customers\user1092190\www\v2\blog\blog.php on line 10my script is this<?phpheader( 'Location: http://www.fazlionline.com/wordpress/' ) ;?>note: i have past this script in the main body tagis there any rule to put the redirect in a special place?Thanks Link to comment Share on other sites More sharing options...
jarrett000 Posted May 10, 2009 Share Posted May 10, 2009 If you're using the header method yes, there is a special place. You have to have that code as the very first thing on the entire page, or you'll get that error. Don't even leave a blank line before it. Link to comment Share on other sites More sharing options...
vytas Posted May 10, 2009 Share Posted May 10, 2009 U can't put it in the <body> tag it needs to be before everything else. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.