note 70151 added to function.header
| From: | support at sumago dot de | Date: | Wed, 04 Oct 2006 20:46:03 +0000 |
| Subject: | note 70151 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-118064@lists.php.net to get a copy of this message | ||
If you don't want people to go to
http://www.sumago.de,
but want them automatically redirected to
http://www.sumago.de
or
http://sumago.de
(so with the 'www.' or the 'prefix.'), this function might be useful:
<?
if (!strstr($_SERVER['HTTP_HOST'],"www."))
{
Header("Location:http://www.".$_SERVER['HTTP_HOST'].
"/?".$_SERVER['QUERY_STRING']);
}
?>
Replace the 'http://www.' to your own prefix. E.g.
'http://prefix.'
----
Server IP: 66.163.161.117
Probable Submitter: 84.190.62.231
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/70151
Del: integrated -- https://master.php.net/note/delete/70151/integrated
Del: useless -- https://master.php.net/note/delete/70151/useless
Del: bad code -- https://master.php.net/note/delete/70151/bad+code
Del: spam -- https://master.php.net/note/delete/70151/spam
Del: non-english -- https://master.php.net/note/delete/70151/non-english
Del: in docs -- https://master.php.net/note/delete/70151/in+docs
Del: other reasons-- https://master.php.net/note/delete/70151
Reject -- https://master.php.net/note/reject/70151
Search -- https://master.php.net/manage/user-notes.php