If all of your pages share an include file, then add to the include file something like this:
<?php if(strstr($HTTP_HOST, "oldhostname.tld")){ header("Location: http://www.newhostname.tld".$PHP_SELF); } ?> That way all requests to the old url will be redirected to the new url. You can also do something similar with JAVASCRIPT (I see you are using Dreamweaver, consider modifying a common library item to handle the redirection using javascript) Just a thought. Hope it helps. Robert Zwink http://www.zwink.net/daid.php -----Original Message----- From: Kevin Ruiz [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 10:05 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] rewriting the $server_name variable with php? Is there anyway to rewrite the $server_name variable with php? This is kind of an ambitious post for I think I already know the answer. My company has just changed our corporate identity and we want our old url to point to the new one, http://www.worktiviti.com. This isn't a problem, we've changed the DNS entries and everything is fine except for the fact that my boss doesn't want people to see the old url. He wants the url to reflect the new company name, worktiviti. I've talked to our hosting company and they said they would look into editing the httpd.conf file but it doesn't seem likely that they would change the config file for one customer. I know that you can change the url through the mod_rewrite module with Apache but I am not that familiar with apache nor do I have access to the config file. If anyway has any suggestions as to how php could help me out I'd appreciate it. Thanks in advance, Kevin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]