Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@halgatewood
Created February 13, 2014 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halgatewood/8984638 to your computer and use it in GitHub Desktop.
Save halgatewood/8984638 to your computer and use it in GitHub Desktop.
HTTPS Page in Wordpress
<?php
/**
* Template Name: HTTPS Page
*/
if($_SERVER['HTTPS']!="on")
{
wp_redirect( "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment