Plugin Directory

Changeset 1786851


Ignore:
Timestamp:
12/14/2017 10:34:03 AM (8 years ago)
Author:
rehmatworks
Message:

Fixed a minor bug related to 301 redirects

Location:
wp-ssl-redirect/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-ssl-redirect/trunk/readme.txt

    r1775500 r1786851  
    44Requires at least: 3.95
    55Tested up to: 4.9
    6 Stable tag: 1.3.2
     6Stable tag: 1.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3737== 1.3.2 ==
    3838* Fixed a major bug related to sub-directory installations
     39== 1.4 ==
     40* Fixed a minor bug related to 301 redirects
  • wp-ssl-redirect/trunk/wp-ssl-redirect.php

    r1775492 r1786851  
    3030          <div class="notice notice-error">
    3131            <p>All In One SEO Pack is known to create issues with WP SSL Redirect so WP SSL Redirect's features will not work unless you will deactivate <strong>All In One SEO Pack</strong> first.</p>
    32         </div>
    33       <?php }?>
    34       <?php
    35         if(is_plugin_active('wordpress-seo/wp-seo.php')) {?>
    36           <div class="notice notice-error">
    37             <p>Yoast SEO is known to create issues with WP SSL Redirect so WP SSL Redirect's features will not work unless you will deactivate <strong>Yoast SEO</strong> first.</p>
    3832        </div>
    3933      <?php }?>
     
    8781      }
    8882    }
    89 
    90     $wpsslredir_url = str_replace('http://', 'https://', $wpsslredir_requested_url);
    9183    $wpsslredir_new_siteurl = str_replace('http://', 'https://', $wpsslredir_main_url);
    9284    if($wpsslredir_new_siteurl !== site_url()) {
     
    9688      }
    9789    }
    98 
     90    $redir_parsed = parse_url(str_replace('http://', 'https://', $wpsslredir_requested_url));
     91    $wpsslredir_url = rtrim(site_url(), '/') . $redir_parsed['path'];
    9992    if($requested_full !== $wpsslredir_url) {
    10093      header('Location: '.$wpsslredir_url, true, 301);
Note: See TracChangeset for help on using the changeset viewer.