Re: turn off the www

From: Date: Wed, 29 Jun 2005 18:51:08 +0000
Subject: Re: turn off the www
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-217856@lists.php.net to get a copy of this message
OK OK I got it ;) I just suggested it because I thought he could assume that "www." would always be on the string. Either way, I guess _one_ preg_replace is alright. On 6/29/05, Kevin L'Huillier <klhuillier@gmail.com> wrote: > > > Wouldn't > > > > > > $newUrl = 'https://' . substr( > > > $_SERVER['SERVER_NAME'], 4 ) ......... > > > > > > be a _hell_ of a lot faster? > > > > If one considers micro-seconds 'a _hell_ of a lot faster', then _maybe_ > > And it could be slower if you avoid sending someone from > http://example.com/ to > https://ple.com/ by adding a substring > check. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#217856) next »