note 53255 deleted from function.header by bjori
| From: | bjori@php.net | Date: | Mon, 27 Mar 2006 09:49:58 +0000 |
| Subject: | note 53255 deleted from function.header by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106725@lists.php.net to get a copy of this message | ||
Note Submitter: mike at go dot online dot pt
----
Here's an updated version of my post from 11-Apr-2005.
It might still need to be edited to suit your server's settings. Test the variables
$SERVER_NAME and $HTTP_HOST before you use it.
I find this a very nice alternative if your unable to use Apache's mod_write module.
<?php
if (!strstr($SERVER_NAME, 'www')) {
header("Location: http://www.$SERVER_NAME$REQUEST_URI");
exit;
}
?>