|
-
Jan 9th, 2007, 02:20 PM
#1
Thread Starter
New Member
[RESOLVED] Browser redirection problem
Hey peepz
I can't find any info on this from 't3h g00gl3', and am in quite a rush to get this site finished, so I'll ask here:
It's come to my attention that you cannot redirect the browser to another site if the browser has already recieved HTML tags.
Q1, is this true? I guess so, as its not working for me
Q2: Is there a way around it?
Be sure that you do not have any text sent to the browser before this, or it will not work. Your safest bet is to simply remove all content from the page but the redirect code.
PHP Code:
<html>
<?php
//this will NOT work, the browser received the HTML tag before the script
header( 'Location: http://www.yoursite.com/new_page.html' ) ;
?>
Source: http://php.about.com/.../phpredirection.htm
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|