i hate these sort of problems. weird unexplainable ones. on my not found page i have this right at the start:
note: puttingCode:<?php /* if a corrected url submission redirect to it */ include ('/home/users/theusername/html/thewebsiteaddress.com/includes/contact.inc.php'); /* for mystriptslashes() and email address */ $host = $_SERVER['HTTP_HOST'].'/'; if( isset( $_POST['uri-submit']) ) { $corrected_uri = str_replace(' ','%20',trim(mystripslashes($_POST['corrected-uri']))); header( "Location: http://$host$corrected_uri" ); exit; } /* bits for later */ $request_uri = substr( mystripslashes($_SERVER['REQUEST_URI']), 1 ); ?><!DOCTYPE html PUBLIC "-//W3C//DTD ....
echo '<h1>', $host, '</h1>';
in after where $host is set prints out:
www.domainname.com/
the important thing for this question is the slash.
then later on in the not found page's code i have:
this prints out asCode:<h2><span class="url"><?php echo $host; ?><span class="wrong"><?php echo $request_uri; ?></span></span> not found</h2>
www.domainname.comxyz
where xyz is the not found page's part -- no slash. same $host variable ?!? wtfworked on a different server ok as well.
any ideas why the slash isn't on the $host variable a little later on, on the same page?
ok, just before posting this i though "i'd better check just in case $host isn't some previously used variable or something" and changed all (four) occurances of $host to $hostxyz and it's now printing out the slash ?!? any ideas what's going on there?
thanks.



worked on a different server ok as well.

Bookmarks