Last active
December 15, 2015 23:59
-
-
Save putzflorian/5343881 to your computer and use it in GitHub Desktop.
Website_Controller_Action::init(); Man kann nun also ein Property (https) am Dokument vergeben, ist dieses gesetzt, so ist dieses Dokument per HTTPS erreichbar, ansonsten nicht. Damit ist das Ganze um einiges flexibler und man muss auch nicht immer manuell die .htaccess bzw. apache-config ändern.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // HTTPS Check | |
| if($this->getRequest()->isSecure()) { | |
| if(!$this->document || !$this->document->getProperty("https")) { | |
| $this->_redirect("http://" . $_SERVER["HTTP_HOST"] . $this->getRequest()->getRequestUri()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment