replaced strlen with mb_strlen for correct URL prefix delimitation

If a non-ASCII character is found in the URL prefix, strlen() will count it as
more than one character, thus failing at truncating the prefix.