Can anyone help me with this problem I am trying to make a php redirect work from a config file. Here is the part of the config file that I need a url redirect done in: $config['my_url'] = ' the redirect url would go here so I need to know how to config it'; And here is the code I was working with to make the redirect work in the php pages. <?php echo $config['my_url'];?> ( was wanting to use this in the header of the index or built pages to call up the config file wich wold bring up the redirect path.
Redirects must be sent before echo'ing out anything and like this header("Location: http://www.google.com"); exit;
Which won't work for those with JS disabled. If you're going to use HTML you may as well use a meta redirect. Onur is right, unless you enable output buffering.
if your doing a echo why not echo a meta redirect and then you can set a timer on it so that they can read what your echo states in the first place.