?php
if($_SERVER['SERVER_PORT'] !== $encport || $_SERVER['HTTPS'] !== on)
{header(Location:
https://.$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']);exit;}
?
Very bad solution.
Don't just tell us it's bad, explain why (even with an RTFM or URL to
look at)... nobody learns from an answer
I have separate document roots for the http and the https stuff, say
htdocs and htdocs-secure - this can be done with apache
configuration
then I need only to put a single redirecting line into the
htdocs/index.php like
?php
header(Location: https://my.server.com/;);
?
and that's all
greets
On 4/10/07, Zoltán Németh [EMAIL PROTECTED] wrote:
I have separate document roots for the http and the https stuff, say
htdocs and htdocs-secure - this can be done with apache
configuration
then I need only to put a single redirecting line into the
htdocs/index.php like
?php
header(Location:
On Mon, April 9, 2007 8:38 am, Martin Marques wrote:
Ben Liu escribió:
What's the prescribed method for redirecting a user forcibly to from
the
non-SSL secured version of a page to the SSL-secured version? Is
this
handled at the web server level or at the script level. I found this
by
What's the prescribed method for redirecting a user forcibly to from
the non-SSL secured version of a page to the SSL-secured version? Is
this handled at the web server level or at the script level. I found
this by googling:
?php
if($_SERVER['SERVER_PORT'] !== $encport || $_SERVER['HTTPS']
Ben Liu wrote:
What's the prescribed method for redirecting a user forcibly to from
the non-SSL secured version of a page to the SSL-secured version? Is
this handled at the web server level or at the script level. I found
this by googling:
?php
if($_SERVER['SERVER_PORT'] !== $encport ||
Ben Liu escribió:
What's the prescribed method for redirecting a user forcibly to from the
non-SSL secured version of a page to the SSL-secured version? Is this
handled at the web server level or at the script level. I found this by
googling:
This should be done with the rewrite instruction
On 4/9/07, Martin Marques martin@bugs.unl.edu.ar wrote:
This should be done with the rewrite instruction of apache, or what ever
instructionyour web server has.
Um...guess I will have to check with our hosting company about this. Thanks.
- Ben
--
PHP General Mailing List
Ben Liu wrote:
On 4/9/07, Martin Marques martin@bugs.unl.edu.ar wrote:
This should be done with the rewrite instruction of apache, or what ever
instructionyour web server has.
Um...guess I will have to check with our hosting company about this.
Thanks.
- Ben
Hello,
FYI :
?php
On 4/9/07, Ben Liu [EMAIL PROTECTED] wrote:
What's the prescribed method for redirecting a user forcibly to from
the non-SSL secured version of a page to the SSL-secured version? Is
this handled at the web server level or at the script level. I found
this by googling:
?php
-Original Message-
From: Ben Liu [mailto:[EMAIL PROTECTED]
Sent: Monday, April 09, 2007 3:52 PM
To: Martin Marques; PHP
Subject: Re: [PHP] redirect http to https
On 4/9/07, Martin Marques martin@bugs.unl.edu.ar wrote:
This should be done with the rewrite instruction of apache
On 4/9/07, Peter Lauri [EMAIL PROTECTED] wrote:
You might be able to do this by putting an .htaccess file in your webroot of
non-ssl:
--
RewriteEngine On
RewriteRule ^/(.*)$ https://www.yourdomain.com/$1 [L]
--
This appears to work:
RewriteEngine On
RewriteCond %{SERVER_PORT}
12 matches
Mail list logo