Skip to content

Commit

Permalink
Make sure only first instance of pre-WP path is chopped off requested…
Browse files Browse the repository at this point in the history
… path
  • Loading branch information
tlovett1 committed Oct 10, 2012
1 parent a95394a commit f41cdf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion safe-redirect-manager.php
Expand Up @@ -696,7 +696,7 @@ public function action_parse_request() {
*/
$parsed_site_url = parse_url( site_url() );
if ( '/' != $parsed_site_url['path'] ) {
$requested_path = str_ireplace( $parsed_site_url['path'], '', $requested_path );
$requested_path = preg_replace( '@' . $parsed_site_url['path'] . '@i', '', $requested_path, 1 );
}

foreach ( $redirects as $redirect ) {
Expand Down

0 comments on commit f41cdf4

Please sign in to comment.