Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
T5 Fix HTTPS header on Apache
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Fix HTTPS header on Apache
* Version: 2015.07.23
* Author: toscho
* Author URI: http://toscho.de
* License: MIT
*/
if ( empty ( $_SERVER['SERVER_SOFTWARE'] ) )
return;
if ( FALSE === stristr( $_SERVER['SERVER_SOFTWARE'], 'apache' ) )
return;
if ( empty ( $_SERVER['HTTPS'] ) )
return;
if ( '1' === $_SERVER['HTTPS'] )
$_SERVER['HTTPS'] = FALSE;
if ( '1' === $_SERVER['HTTP_HTTPS'] )
$_SERVER['HTTP_HTTPS'] = FALSE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.