Permalink
Browse files

Make sure only first instance of pre-WP path is chopped off requested…

… path
  • Loading branch information...
1 parent a95394a commit f41cdf41ebe1032fd4ae0ff9cd1932d240b49af0 @tlovett1 committed Oct 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 safe-redirect-manager.php
@@ -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 ) {

0 comments on commit f41cdf4

Please sign in to comment.