PluginProbe ʕ •ᴥ•ʔ
WP Force SSL & HTTPS SSL Redirect / 1.4
WP Force SSL & HTTPS SSL Redirect v1.4
trunk 1.4 1.5 1.55 1.56 1.57 1.60 1.65 1.66 1.67 1.68 1.69
wp-force-ssl / plugin.php
wp-force-ssl Last commit date
index.php 11 years ago php-backwards-compatibility.php 7 years ago plugin.php 7 years ago readme.txt 6 years ago wp-force-ssl.php 7 years ago
plugin.php
21 lines
1 <?php
2 // Prevent direct access to this file.
3 if( !defined( 'ABSPATH' ) ) {
4 exit( 'You are not allowed to access this file directly.' );
5 }
6
7 // "The Core"
8 define('FORCE_SSL' , true);
9
10 if (defined('FORCE_SSL'))
11 add_action('template_redirect', 'wpfssl_core');
12
13 function wpfssl_core(){
14
15 if ( FORCE_SSL && !is_ssl () )
16 {
17 wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 );
18 exit();
19 }
20 }
21 ?>