Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // add this to functions.php file
- function toz_force_https () {
- if ( !is_ssl() ) {
- wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 );
- exit();
- }
- }
- add_action ( 'template_redirect', 'toz_force_https', 1 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement