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
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);
}
$newurl = https://; . ereg_replace(^www., , $_SERVER[SERVER_NAME])..
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
On Wed, 2005-06-29 at 10:57 -0700, Philip Hallstrom wrote:
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);
}
André Medeiros wrote:
snip
$newurl = https://; . ereg_replace(^www., , $_SERVER[SERVER_NAME])..
Wouldn't
$newUrl = 'https://' . substr( $_SERVER['SERVER_NAME'], 4 )
be a _hell_ of a lot faster?
/snip
If one considers micro-seconds 'a _hell_ of a lot faster', then _maybe_
--
On Wed, 2005-06-29 at 10:57 -0700, Philip Hallstrom wrote:
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);
}
$newurl = https://;
Hello André,
Wednesday, June 29, 2005, 8:03:00 PM, you wrote:
AM Wouldn't
AM $newUrl = 'https://' . substr( $_SERVER['SERVER_NAME'], 4 )
AM be a _hell_ of a lot faster?
Sure.. providing they always link to the page using www.domain.com
(and the same goes for anyone else who links to
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
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 [EMAIL PROTECTED] wrote:
Wouldn't
$newUrl = 'https://' . substr( $_SERVER['SERVER_NAME'], 4 )
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.
Heh :-) Just for kicks...
- randomly prefix www. onto 1324 proper names (dictionary file). 659 end
up with www. prefixed.
-
People have fun with the oddest things ;)
Anyway, it's a nice reference to have around :)
On 6/29/05, Philip Hallstrom [EMAIL PROTECTED] wrote:
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_
[top posting out of spite] ;-)
I'm guessing that the OP is only dealing with 1 domain?
why not...
?
// define in a handy config file?
define('BASE_DOMAIN', 'yourdomain.com');
if($HTTP_SERVER_VARS['HTTPS'] != 'on') {
header('location: https://'.BASE_DOMAIN.$_SERVER[REQUEST_URI]);
}
?
12 matches
Mail list logo