Re: turn off the www
| From: | John Nichel | Date: | Wed, 29 Jun 2005 17:59:08 +0000 |
| Subject: | Re: turn off the www | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217849@lists.php.net to get a copy of this message | ||
Ross wrote:
now..... I am using the following code to turn http into https and get my ssl working. if($HTTP_SERVER_VARS["HTTPS"] != "on") { $newurl = "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; header("location: $newurl"); } However I set the ssl up on http://mydomain.com not http://www.mydomain.com and it give me a warning which I do not want the users to see. Can I do someting to make any page automatically redirtect as above using https WITHOUT the www in this format https://mydomain.com$newurl = "https://" . preg_replace ( "/^www\./i", "", $_SERVER["SERVER_NAME"] ) . $_SERVER["REQUEST_URI"]; -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.com