Re: https forced redirect question
| From: | Robert Cummings | Date: | Fri, 15 Feb 2008 20:09:02 +0000 |
| Subject: | Re: https forced redirect question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-269375@lists.php.net to get a copy of this message | ||
On Fri, 2008-02-15 at 15:05 -0500, Robert Cummings wrote:
> On Fri, 2008-02-15 at 14:58 -0500, nihilism machine wrote:
> > why isnt this redirecting my page to
> > https://www.mydomain.com instead
> > the page stays at my domain.com
> > <?php
> >
> > class URL {
> >
> > // Public Variables
> > public $HTTPS;
> > public $ServerName;
> > public $WWW;
> >
> > // Public Functions
> >
> > public function __construct() {
> > $this->checkHTTPS();
> > $this->checkWWW();
> > $this->ServerName = $_SERVER['SERVER_NAME'];
> > }
> >
> > // Check if HTTPS
> > public function checkHTTPS() {
> > if ($_SERVER['HTTPS'] != "on") {
> > $this->HTTPS = false;
> > } else {
> > $this->HTTPS = true;
> > }
> > }
> >
> > // Redirect to HTTPS Site
> > public function HTTPSRedirect() {
> > if($this->HTTPS = false) {
>
>
> Because you're assigning false. Some people switch the order of the
> operands so that a typoe like this generates an order. Personally, I
^^^^^
Should be "error".
For some reason my finger to brain connection has been experiencing an
inordinate number of erroneous packets today.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'